Community structure and dynamics of the free and attached microorganisms during moderately thermophilic bioleaching of chalcopyrite concentrate.