local-metadata: Support seasonxepisode format in filenames

seasonxepisode, for example 5x24 is a less common format than S5E24, but it's
out there.

This commit adds support for this format in filenames.

https://bugzilla.gnome.org/show_bug.cgi?id=725026
test: Add some broken tests with FIXMEs

This will be helpful to point out known bugs in the episode
parsing.
upnp: tag sources on the local machine

Recognize sources that correspond to rygel or similar
software on the local machine, and add a "localhost"
tag to the source. This will allow Totem or other
applications to filter the source out.

The actual recognition is a bit hackish, because all we see
is the URI provided by SSDP. There is a fallback to comparing
hostnames, but because usually DNS is not configured in a home
network, we should almost always see an IP address there.
From that, we need to check if any interface is configured to
use it. We could ask NetworkManager or connman, but that would
grow an heavy and unwanted dependency; we could ask netlink,
but that would fail outside of Linux; the simplest, although
quite hackish, solution is to try and bind() to the remote
address - if that succeeds, the address is local after all.
The biggest downside to this solution, besides being Unix only
due to EADDRNOTAVAIL, is that socket() can fail because of
EMFILE/ENFILE, in which case we can't perform the check.
Not a big deal maybe.

https://bugzilla.gnome.org/show_bug.cgi?id=723780
upnp: tag sources that belong to the same user

If the source is found to be on the local machine, scan /proc/net/tcp
to find the UID of the process that is listening on the socket,
and tag the source if it's the same user as the one running the
client.

https://bugzilla.gnome.org/show_bug.cgi?id=723780