Fixes to handling of boxed types

Boxed types and primitive types should cooperate properly now with
primitive types in all basic cases. Added tests that verify this.
Merge pull request #17 from Hilzu/Boxing

Fixes to handling of boxed types