Fix Network object encoding issue when using qpid

When creating network via REST API will throw the exception
"CodecException: no encoding for
<nova.db.sqlalchemy.models.Network object at 0x4a8ea10>".
It only occurs when using qpid.
Fix this issue through using jsonutils.to_primitive method.

Fix bug 1143584.

Change-Id: I833aef451f8e3d5eaa246c19d67b2474a9d36910
(cherry picked from commit b4d43b0d0c890ccb940862719c6b88a24029d44a)