Clean up orphaned items (fixes #291)

These changes extend the cleanup function of the items daos to also remove any items whose source field doesn't have a corresponding entry in the sources table.

From my testing, #291 occurs when deleting a source while update.php is running and fetching items for that source.
So, one (unreliable) option would have been to check if the source still exists every time an item is inserted, or to clean up afterwards and delete all items that don't have a corresponding source.
I think that cleaning up afterwards is the better way to handle this, as it takes care of other cases I might have missed where items could be orphaned and it also removes orphaned items that have already been inserted into the db.