Fix merge conflict
Fix erlang:monitor/2 race condition that caused multiple delivery of messages on incorrect {'DOWN', _, _, _, noproc}
Cleanup
Pick the right {gateway_id, output_message_id} message using latest datetime.

The problem is when SMPPSim is restarted it starts to deliver output_message_id starting from 0. This way an inconnect
message would been selected using just {gateway_id, output_message_id} index. This is fixed by previously sorting
all [{gateway_id, output_message_id}] by descending order and then selecting the first one.
Refactor connection record.

The connection is a distinct SMPP primitive that describes a SMPP connection.
SMPP full fields name should be used. Also bind_type should contain atoms
transmitter, receiver, and transceiver. Http api should also force meaningfull
bind_type parameter value like transmitter, receiver, and transceiver.
Add xref
Review internal data structures. Cleanup