Respect channelMax

Limit number of channels to channelMax as negotiated with the server.
Try to find an available channel id, even if it means to wrap around.
Return ErrChannelMax if no available channel id can be found.

Addresses #115
@w00204372 no you are right, id in the loop can get 0, but i though m.channels[0] was not nil at all time. Is that not true?