Added gzip support

MPExtended will compress the response if the Accept-Encoding header includes gzip
Added X-Original-URL check

When MPExtended is behind a proxy it needs to know what the original URL was so web stream results can be set correctly
Added EditSchedule

WebMediaPortal uses two operations (DeleteSchedule + AddSchedule) to simulate an edit. This makes it possible to do the same thing in one operation which is important if you're making the request remotely.
Fixed X-Original-URL

The default port logic was missing brackets around the HTTP or HTTPS
condition
Changed X-Original-URL to X-Original-Host

It turns out URLRewrite in IIS already adds an X-Original-URL header to the proxy request but it contains only the server path which is exactly the opposite bit that I want. That being the case I've changed the header MPE looks for to X-Original-Host
Fixed "System.InvalidOperationException: Collection was modified" during service startup

As noted by Ollienator in
https://github.com/MPExtended/MPExtended/commit/25f93d263dde1cf37b80344a791eafb63fb158c7#diff-a91b3c24b081341356d4fe00121e62cc
the following error is sometimes thrown:

System.InvalidOperationException: Collection was modified; enumeration
operation may not execute.
at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource
resource)
at System.Collections.Generic.List`1.Enumerator.MoveNextRare()
at System.Collections.Generic.List`1.Enumerator.MoveNext()
at System.Linq.Enumerable.WhereListIterator`1.MoveNext()
at System.Linq.Enumerable.<SelectManyIterator>d__14`2.MoveNext()
at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
at System.Linq.OrderedEnumerable`1.<GetEnumerator>d__0.MoveNext()
at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source)
at
MPExtended.Libraries.Service.Network.NetworkInformation.LoadIPAddress()
in
E:\Source\MPExtended\Libraries\MPExtended.Libraries.Service\Network\NetworkInformation.cs:line
98
at
MPExtended.Libraries.Service.Network.NetworkInformation.GetIPAddressForUri()
in
E:\Source\MPExtended\Libraries\MPExtended.Libraries.Service\Network\NetworkInformation.cs:line
78
at
MPExtended.Libraries.Service.Hosting.BaseAddresses.GetForService(String
serviceName) in
E:\Source\MPExtended\Libraries\MPExtended.Libraries.Service\Hosting\BaseAddresses.cs:line
36
at MPExtended.Libraries.Service.Hosting.WCFHost.CreateHost(Plugin`1
plugin) in
E:\Source\MPExtended\Libraries\MPExtended.Libraries.Service\Hosting\WCFHost.cs:line
86

Since the order of the "Loading service " logging output is not always
the same I suspect the services are loading in parallel causing a race
condition where NetworkInformation::GetNetworkInterfaces initialises
_interfaces more than once. To fix this I've put a lock guard around the
contents of the method so subsequent threads will block until
_interfaces is fully set up
Refactored class names from GZIP to Compression

The only GZIP specific code is in the message encoder, I've added
deflate support as well so now the classes have misleading names,
CompressionContext (formerly GzipContext) now carries compression type
information so it actually has something to do in addition to just
existing. It also solves the awkward problem of not knowing if Gzip or
GZip is the correct capitalisation.
Changed X-Original-Host to X-Root-URL

Put "URL" back in to imply it's more than just the hostname (which you
can get as standard anyway), changed log level to trace as the end user
is unlikely to be interested every time once it's been set up.
Compression fixes

For some reason the streams only flush if you put them inside "using"
blocks. I've tried not to do too much cargo cult copy 'n' paste, will
revisits this code later
Enhanced EditSchedule

Included all parameters you can pass to AddScheduleDetailed. It's a mix
of default null values optional args where the language syntax allows
(this is where my lack of C# experience shows I'm afraid)
Improved LibraryList error logging

Added the type so "unknown id 0" becomes "unknown id 0 of type Music" in
the logs
Changed EditSchedule to Nullable ints

The int parameters were defaulted to int.MinValue, now changed to
Nullable objects. The strings stay as they were since the defaults are
already null and that remains the check in the logic.
Fixed compression for downloads and streaming

More of the endpoints in App.config needed to be wired up to use
compressionBehavior and customWebHttpBinding. Tidied up
CompressionMessageEncoderFactory, removed commented out code and
DecompressBuffer which is never called
Added content type to CompressionMessageInspector logging in BeforeSendReply
Some minor code cleanup and reformatting
Merge pull request #401 from MrTechno/master

- Add compression support for request body and responses
- Add support for writing the output URL based on input from an
  upstream reverse proxy
- Fix race condition in NetworkInformation.GetNetworkInterfaces()
- Add EditSchedule method to TAS
Libraries: Detect MP versions up to 1.7