Functional Adaptor Signatures: Beyond All-or-Nothing Blockchain-based Payments