changed Location to have smart pointers to Segments
Added consistency tests for deleting segment/location and setting return segment/source to NULL
added InstanceStatus attribute to Instance class