Remove the ability to wait for certain message types to arrive.

It is unused and can lead to ping timeouts easily, and will be useless
in the upcoming connection rewrite anyway.
Copy input modes in the mode parsing function to prevent side-effects.

This fixes issue #9.