Fixed three issues.

1. two tests for generateChannelId
2. declared sequence numbers constant.
3. fixed memory leak in Communicator/ProtocolDispatcher class:
    Dynamically allocated protocol message objects are now managed using
    shared_ptrs and therefore automatically freed.