Added py.test test cases.
Destroy Coap class explicitly.

Since the threads were members of Coap class destorying them in __del__() wont work.
None is causing an exception in coap_message construct parsing, so using empty string if None was passed.
This happened when a response was received with no payload(separate).
Encapsulate msg.state and msg.state_change_timestamp inside Message class.
Document Message class memebers.
Correctly calculate message timeout.
Split _receive_message() into multiple functions to handle ACK and RESPONSEs separately. This enables handling both SEPARATE and PIGGYBACKED responses.