Tunable magnetism and spin-polarized electronic transport in graphene mediated by molecular functionalization of extended defects