Electrically controlled electron transfer and resistance switching in reduced graphene oxide noncovalently functionalized with thionine