Combine MessageUtils and RelayUtils (only needed in NAT module)

+ other minor corrections
Merge branch 'master' into error-handling
Pending requests should be thread-safe

Buffer could trigger the listener at the same time as the mobile device
retrieves the current buffer.
Add timeout for pending requests
Add test for timeout