Fix rules for checking Borrowed types

Need to ensure that the scope of a let binding doesn't refer to names
used in the let bound value, otherwise we might update or destroy before
reading!
Add unique002 test
Store kind in Pi binders

We need to know the kind for properly checking uniqueness under partial
application. Also, we need to propagate uniqueness right into the scope
of a binding - once we're in a unique context, any function we make has
to run in unique context or we might accidentally duplicate things.
Fix universe errors, update tests
Fix output of unique001a
Really fix output of unique001a...
Merge pull request #1486 from edwinb/nulltype

Fix rules for checking Borrowed types