add tests for interrupting/resuming input port, and fix behavior

The Port::resume command was not putting a port back in a good
state after a Port::interrupt call, only output ports had been
considered.

fixes #174 (thanks @ali-khalili)