Fix track updating

The trick seems to be to delete changed metadata from a session,
while adding the Track object representing the new metadata.

This seems to fix the problem of multiple entries after a metadata
change.

I am still not entirely sure how the problem arose. Without this
change, creating a Track() object and never explicitly committing
it with session.add() still put it in the database.
Fix misbehaving tests

For the one that updates metadata, I added a sleep() call
to prevent the mtime from being the same.