QM/MM investigation of the hydrogen-bonding interactions in putative K and early-M intermediates of the bacteriorhodopsin photocycle