A more precise Rel & Decidable and some reshuffling of related code

There was previously the potential of having non-n-ary-relations where one would expect n-ary relations.

Warning:  At the moment, the REPL fails to resolve instances of Decidable, and it's not all that clear to me how tolerable this problem is. Instance resolution in source files appears to work fine.

Based on code by Melvar.