Made SharingItemTrackerImpl create an sqlite database

The trickiest thing was to decide how to handle the acutal files for
sharing DBs, since they should be just temporary.  The situation I
wanted to avoid was miro crashing and leaving behind temporary files.
Decided to go with a scheme where use the path
%support_dir%/sharing-db-X and we try to delete exiting
files if we're not currently using them for a sharing DB.

Other than that, nothing is really implemented.  We just open the
database when we connect to a share and close it at disconnection.

Added unittests to check.  Refactored SharingItemTrackerImpl slightly
to make it easier to test.
Made SharingItemTrackerImpl create sqlite items

Removed old code using the itemsource module.  Added new code that
creates a SharingItem in the sqlite DB for the share.

Changed what tabs we send to the frontend.  Before we were sending
"fake" SharingInfos for the videos/audio/podcast/playlist tabs.  Now
we just send the actual playlist.  Also added a separate tab class for
playlist share tabs.

Rewrote the client_connect(), client_update() and setup_items().  They
all can be much simpler now.

Split the metadata code out of ItemBase since SharingItem doesn't care
about it.

Wrote a bunch of tests for the new code.  Renamed the test class to
"SharingTest" since it tests more than database code now.
Created backend class to track data for a share

This solves a bunch of issues with getting the new code to work:
  - We need to send the frontend the path to the database, but it
    didn't exist when SharingInfo was created.
  - We weren't calling SharingTracker.get_tracker() anymore, so
    SharingItemsTrackerImpl was not going to be created.

I think it's also a step in the right direction to create a
backend-only Share object.  Right now we have a bad situation where
both the backend and the frontend are using the same SharingInfo
object.  There's some synchronization issues there and also, I think
some things should be only accessible from the backend.  Ticket #19869
has more of my thoughts on this.

Added sqlite_path to SharingInfo.  The frontend is going to need it
once it starts using the itemtrack code.

Changed the code to create databases slightly:
  - Don't keep trying to create databases if opening the database
    fails.  If we can't open a sqlite database on an empty path then
    we probably shouldn't just keep trying new paths.  It's probably a
    permissions error, or a disk space issue.
  - Use fileutil.delete() to delete the file.  This works around
    windows file locking issues and if the frontend still has the
    database open.
  - Because we are now not sure when a database file will get deleted,
    don't try to re-use paths that we've already used this run.
Refactor connectionpool and create a connection pool for shares

Made one object that stores all our connection pools -- the main pool,
pools for devices, and pools for shares.
Changed the input for MockDAAPClientLibrary.set_items()

We can calculate the item id from the item itself, so there's no need
to pass it in.
Change how sharing items are created

Make share the first argument to the constructor.  Store share_id in
the SharingItem object.  Get db_info from the share.
Implemented SharingItem/SharingItemTracker
Fixed class hierarchy for SharingItemSchema/DeviceItemSchema

These always use the same DDBObject class so they should just inherit
from ObjectSchema.  I think it was a copy-and-paste error from
ItemSchema.
Added table that maps sharing items to their playlists

I decided to not use the DDBObject class for this purpose.  They way
we currently use it for playlists is pretty awkward, and I'm not sure
if it's error-free.

Instead, I made a new module in the data package to handle mapping
tables.
Added support for filtering sharing items by their playlists

Refactored the code that determines if an ItemChanges message could
result in the item list being changed.  We needed a bit more
flexibility to deal with sharing items.
Made sharing items work when not in WAL mode
Refactored itemtracktest so the test classes share some common code

Also made sure we destroy item trackers at the end of the test.  I
noticed that the itemtracktest was taking up a bunch of memory and
keeping open handles to sqlite files.  This should help that (although
there are still issues)
More fixes for the item track tests

Fixed a bunch of things so that these test don't leak resources.  It
was getting to the point that my computer would run out of virtual
memory.

Made app.py describe new connection pool system.
Fixed sharing with rythmbox.

Allow the DAAP server to not have a base playlist.  Instead of using
that to get the items, just call items() without a playlist.
Implemented the frontend-side for the new sharing items system

Made SharingItem.video_path a unicode value rather than a string one.
This matches the old API, so I guess it's best.

Changed how we compute sharing ids.  Before they were tuples, which is
a bit weird when used with the rest of the frontend code.  We now
convert the tuple to a int by using hash().  Also changed how we store
ids for SharingInfo/PlaylistInfo.  The new ids are
"sharing-<share_id>" and "sharing-<share_id>-<playlist_id>"
respectively.

Made it so that DeviceItemInfo and SharingItemInfo don't inherit
directly from ItemInfo.  This avoids them picking up properties that
were created based on the ItemInfo's select_info.

Changed SharingItemChanges slightly.  Now playlist_changed is just a
bool that stores if any playlists have changed.  I think that's how we
were using it in the frontend anyway.

Fixed the ConnectionPoolTracker code.  Before it was assuming we got a
info class when things get removed, but we just get the tab id.
Changed things so that we just use the tab id as the key.  I'm pretty
sure tab ids have to be unique anyways.

Cleaned up share ejection.  Switched to using the StopTrackingShare
message instead of SharingEject.  They basically do the same thing and
the new message works better with the rest of the code.  Clear out the
database in stop_tracking().

The one thing not implemented yet is the playlist/podcast tabs under
the share.
Made the podcast/playlist tabs under the share tab work again