Fix for #50: race condition with multiple channels

Fix for opening multiple channels for the same connection (as reported in #50). Instead of freeing channel IDs, we mark them as used.

I am not sure about the ugly casts between long and amqp_channel structs to store an additional state. The other option would be to introduce an int array of slot_states to do it properly. What do you think?