Related to bug 933584.
In this bug, I hit a case where some code tried to send a SQLAlchemy
model over rpc, which failed since it couldn't be serialized by Qpid.
This patch adds a simple serialization check to the fake RPC driver
using json. It also fixes problems that were exposed by adding this
check.
If json can't serialize a message sent through the fake RPC
driver, it will raise TypeError, causing unit tests to fail. 18 unit
tests failed with the check in place, but it was due to only 2 places
in the compute API.
Change-Id: I63f3077c0fa35097d4f5d2c485f4e48eede2c751