Define type instances without wrapper function

All test cases are passing, and test-everything is no more broken than without, but this probably isn't ready yet. Certain types of recursive definitions between instances may not work, but I haven't yet thought of any that weren't already broken by #365.

This required sorting binding groups by their immediate dependencies (those not wrapped in function bodies).  This is not perfect, as those functions may be evaluated immediately, but in any generated instance declarations they are not.
Well, my point is that it should already be caught in the typechecker. That's what the whole `Defined`/`Undefined` stuff in `Environment` is for. Is it not?