feat(tactic/delta_instance): protect names and deal with functions (#2477)
There were (at least) two issues with the `delta_instance` derive handler:
* It couldn't protect the names of the instances it generated, so they had to be ugly to avoid clashes.
* It didn't deal well with deriving instances on function types, so `@[derive monad]` usually failed.
This should fix both. The first is possible with recent(ish) additions to core.
closes #1951
Co-authored-by: Rob Lewis <rob.y.lewis@gmail.com>