Implement db get_[un]associated_nodes

These method were just stubs.
This patch implements them in db/sqlalchemy/api.py, and a subsequent
patch will expose this functionality via the API.

Change-Id: Iae68cbe3bf4e84a0f47a0770695bed9dae78aa95
Be more patient with IPMI and BMC

Before the ipmitool driver called 'power status; power on' in a loop
which made the IPMI/BMCs not behave well.  Also the total time we would
wait (5 seconds) wasn't always enough.  So make sure power on/off is
only called once and wait up to 10 seconds for the power state change to
go into effect.

This is a port of change-id I5a4d7c84ebdf9c1f7d8d0570dbc31764c31f1fc6

Change-Id: I50982b24e5443b34d5597581ea2947a0301d35c9
Closes-Bug: #1234479
Adjust native ipmi default wait time

Make the default wait time for ipminative driver
match the default for the ipmitool driver.

Change-Id: Ica90f2b4d3e5cfa21dbd1318887983cc24eaa16d
Updated from global requirements

Change-Id: I3673966dd6dc2b65c3031acd58abca3f9f58c75b
Remove duplicated db_api.get_instance() from tests

The db_api.get_instance() is being called twice on the setUp() method
for the IPMINativeDriverTestCase class

Change-Id: I4bf9a0fc70132ec8813de192110051ca477da2e8
Don't allow deletion of associated node

Checks that node is associated with instance
added to method destroy_node() in db api.
Exception NodeAssociated raised in case associated node.

Change-Id: I52c7a0b3d33078b38460b5fd08e4cd2d4c7731ef
Merge "Adjust native ipmi default wait time"
Merge "Implement db get_[un]associated_nodes"
Merge "Updated from global requirements"
Merge "Remove duplicated db_api.get_instance() from tests"
Merge "Don't allow deletion of associated node"
Merge "Be more patient with IPMI and BMC"