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.
Yeah, that's exactly what it does (see the end of my long comment after the examples above).  It should probably be cleaned up somehow with a better message, though conceptually it is producing the right error.  We could just ignore it here but it is guaranteed to result in an undefined at runtime.