Quantum dynamics of an optical cavity coupled to a thin semitransparent membrane: Effect of membrane absorption