Quantum phase transitions into Kondo states in bilayer graphene