Fix messaging.get_transport caching

If some case get_transport can return a cached transport
even cache=False

This change fixes it and also adds some unit tests for this method

Change-Id: If87cf60d0a25a84dd05f1b84c35f1bcbfeb69b75
Merge "Fix messaging.get_transport caching"