Rewrote ports to actually receive messages in _receive() instead of _pending().
Simplified BaseInput.__iter__() to call receive() in a loop instead of
duplicating behaviour.