Initial work on new restriction analysis library.
Sanitize the old Restriction module a little bit.

Fix the __len__ issue (that was defined in the wrong metaclass for IPython).
Put all type creations in a single function to clean up the global namespace.
Remove irrelevant comments about import speed.