Introduce macro to simplify testing commands

A command can now be tested with much less boiler-plate code using the new `expect-command` macro. It takes the expected raw string that should be sent to the network and the command (excluding the first argument, `network`).

Accepting this pull request resolves #22.