Avoid calling Unref on a closed port

Fixes #21
Add some tests for opening ports
Remove training white space
Merge pull request #45 from drewish/no-trailing-white-space

Remove training white space
Merge pull request #44 from drewish/safe-double-close

Avoid fatal error when closing unopened port
Record changes since 0.8.1