Faster sorting of CFileItemLists, step 1

CFileItemLists are sorted by first construcing a SortItems object that refers
back to each CFileItem by index, sorting the SortItems object, then rebuilding
CSortItemList::m_items (a vector of pointers to CFileItems) by examination of
the sorted version of the SortItems object.

It might be more sensible, long-term, to sort m_items directly, but in the
meantime, there are a couple of simple ways to make sorting with SortItems
sufficiently efficient that it's not a problem any more.

Previously, SortItems was a vector of SortItem objects, held by value; each
SortItem was a std::map (implemented as a red-black tree) which ended up
being constructed and destructed as each element of SortItems was moved.
This patch changes SortItems to be a vector of pointers to SortItems instead.

Benchmarks for CFileItemList::Sort() on a Raspberry Pi with a library of
600 movies:
Before patch: 4.6 seconds
After patch:  1.1 seconds
Faster sorting of CFileItemLists, step 2

Each time a CFileItemList is sorted, multiple SortItem objects are
constructed and destructed. Each object is a std::map ,implemented as a
red-black tree with one node for each attribute (Field) upon which the
CFileItemList could conceivably have been sorted, even though for any given
SortBy, very few attributes are actually examined by SortUtils::Sort(). Worse
still, many of those nodes involve creating an associated fresh copy of a
string, with all the associated heap thrashing that entails.

This patch changes the various ToSortable methods to limit the number of
items in each SortItem's std::map to those actually required for performing
the chosen sort.

Benchmarks for CFileItemList::Sort() on a Raspberry Pi with a library of
600 movies:
Before patch: 1.1 seconds
After patch:  0.36 seconds
Fix typo in setup of sort-by-album-artist inherited from previous code
ActiveAE: fix wrong device name after creating audio device
Two extra fields now always inserted when SortItems are initialised

These are FieldSortSpecial (used to force certain items like ".." to the
top or the bottom of the list) and FieldFolder (used to ensure folders are
separated from files). These are required in addition to whatever the
primary sort variable is.

Obviously this will impact the speedup of the rest of the patch, but since
neither are string fields, this should be minimal.
Remove unnecessary StdString.h inclusion.
Refactor CWinEvents

We need the implementations to be instantiated in order to extend the
Observer class.
Remove some unused WinEvents stuff under IOS
Allow WinEvents to observe Peripherals changes
Merge pull request #3367 from FernetMenta/aefixes

ActiveAE: fix opening wrong device after suspend
Merge pull request #3313 from t-nelson/winevents_refactor

CWinEvents refactor and allow CWinEvents to observe Peripherals changes
fixed usb mouse/keyboard detection

Peripheral insertions and removals after boot weren't reflected.
Move lirc init before keyboard

LIRC's devinput driver requires exclusive access, which conflicts with our
evdev input manager. If LIRC is able to grab a device and use it, assume that
we want it to, then evdev can't grab it.
Merge pull request #3291 from t-nelson/pivos_input

Pivos input changes
The icky noise problem has been fixed.
Revert "ActiveAE: disable AE_FMT_FLOAT on AESinkAUDIOTRACK, AE_FMT_FLOAT is not clipped correctly and makes an icky noise when audio volume peaks"

This reverts commit 7c5b7e5513f72000cff1d1fcfe508328bf40bbb5.
Merge pull request #3246 from bavison/faster_sorting_step2

Faster sorting of CFileItemLists, step 2
[WIN32] update mingw runtime to 4.0.3 which contains some minor bugfixes.
[WIN32] updated libbluray to 0.4.0 (still without bd-j support yet, but with a little less hacks to build)