Fix self.fields on API Node object

All fields from objects.Node were being added to self.fields in
the API Node object. Because of this, when someone would POST, there'd
be an entry for {'id': None} in the dictionary passed to
dbapi.create_node(). We should only set fields we're exposing.

This also required fixing PATCH to not try to look at fields not set
on the API Node object when mapping to objects.Node.

A later patchset removes the direct dbapi call to create_node() in
flavor of using the objects.Node object where trying to set 'id' of None
would fail prior to this fix.

Change-Id: I92c03d9ff2a56e7999a685f9de38efec5aacbe47
Sync base object code with Nova's

This brings Ironic's base object code more in line with nova's since the
time it was copied. There's still a large difference in the field/type
declarations that we should resolve at some point. (Would be helpful if
this was in oslo, maybe. :)

A couple of these changes are needed for my future patchsets for object
cleanup.

Change-Id: I7e233fb448e9ce56f707d230dc5b2558bdb0a1f9
Fix seamicro power.validate() method definition

* Add task param to the power.validate method definition
* Also add unit tests for the power.validate method

This was not caught when unit testing Ironic using python-seamicroclient
because there is no unit test cover for this method.

Change-Id: I9ed175cffa29b8c10a32c7e121525142e4b170a5
Closes-Bug: #1303670
Merge "Fix self.fields on API Node object"
Merge "Sync base object code with Nova's"
Merge "Fix seamicro power.validate() method definition"