Update reflection code to current core language.

Fixes #796.
Update Eq and Show reflection for internals changes
Add typeclass for programmatic quoting

This is for implementing tactics.