fixed type coercion in omapi module

I think this now makes the omapi test fail so more work needs to be
done, but the omapi stuff hasn't been working anyway.

In general the omapi library tries to handle each command as a separate
transaction with the server.  This causes problems with some things.

It also has error checking issues where rather than watching for the
error, it looks for a lease object.  That causes problems because
sometimes omapi sends the existing lease object along with a failure
message.