Substrate counterdiffusion and reaction in membrane-attached biofilms: mathematical analysis of rate limiting mechanisms