Renormalization of quantum gravity coupled with matter in three dimensions