Fixed message id generation according to spec

Changed id generation from random to increasing by one - as suggested by
the specification. Using random numbers does not guarantee that the same
id isn't used twice. Also made sure that 0 is never used since it's an
invalid message id.

For details see section 2.4 of the spec:
http://public.dhe.ibm.com/software/dw/webservices/ws-mqtt/mqtt-v3r1.html#msg-id