Add unit-tests for all peerwire messages

Also, implement rudimentary encoding implementations for all of them. I
feel like I'm brute-forcing the problem and that this might be rather
slow. But I guess I'd rather optimize it later, once I know my
implementation works and have what to test against.