Refactored subscription handling (fixes four bugs)

This is what I talked about on IRC. I decided it would be better to wrap a subscription as a class (could be a struct too but I thought I'd change it to a class since it has a constructor) so we could get rid of the various member variables that were only used once or twice.

Four bugs are fixed
* the "demux subscribe to" and "demux unsubscribe to" used different values (subscription ID and channel ID)
* the integer formatting used when logging subscribe/unsubscribe messages is confusing since we log a channel number in hexadecimal form
* a subscription is now marked as inactive immediately in SendSubscribe, this way the client won't restart it it gets disconnected while sending the unsubscribe message (which would lead to two subscriptions being sent to the client, one of which's packets would be dropped all the time)
* when a subscription start fails the precise error message was ignored. The error was assumed to be an integer while in fact it's a string containing the error message. That message is now logged.

I haven't tested this yet, just checked that it builds.