fix id handling and remove command
fix id handling and remove command

Ensure that anything we are going to need a foreign key for is assigned
an id before we set up the relationship.

Fix the remove command to delete data correctly after the add code was
refactored earlier.

stackforge/aeromancer,dhellmann/aeromancer,openstack/aeromancer