Encoding tests

This is a good start for the encoding tests. Some further testing is pending the new compiler ("import public", "groups", "inf", "-inf", "nan", "enum aliases").

Things that should probably still be added:
- [ ] Verify packed repeated field encoding
- [ ] Verify encoding field order