Allow device delete to actually delete data if flag set. Updated APIs to
reflect changes. Updated JUnit tests for device CRUD operations.