Enforce server-side value when client provided one is 0

Keeps bogus clients such as node-amqp from ignoring the channel_max
limit.
Explicitly log handshake errors
merge bug26313 into stable
merge heads
merge stable into default