Fix pin tests.

We no longer require all packages in the dist to be registered
on the stack before pinning.  If you create a stack that has
partial distributions in it, then that is your business.
Only pin/unpin those that are not already pinned/unpinned.
Throw an exception if pinning/unpinning a distribution that is not on the stack.