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
@carlhoerberg i have a test that m.channels[0] is nil,because channel 0 is special-cased in the protocol and cannot be used like "normal" channels.