Switchable graphene-substrate coupling through formation/dissolution of an intercalated Ni-carbide