Merge
Removed main from protocol.c and added include guards to the .h files
Added test cases for protocol
Corrected test_random_protocol()
Merge pull request #12 from amlweems/test-cases

Added test_protocol.c and fixed a small bug when encoding a varint of 0
Merged conflicts