Set pulseaudio channel map to WAVE-EX

Pulseaudio expects clients to specify their channel-map if the
default (ALSA) map does not route the audio to the expected speakers.

Many Google results suggest dealing with this by re-routing the audio
channels with the appropriate ALSA plugin, but this will then simply
break any clients which expect the default ALSA mapping.

Virtually all media files and codecs, certainly flac, dca, a52, and of
course anything based on Microsoft's WAVEFORMAT_EXTENSIBLE specification,
assume the layout in the table here:
http://en.wikipedia.org/wiki/Surround_sound#Standard_speaker_channels

Fortunately, pulseaudio directly addresses this with a built-in channel
map for WAVE-EX which can be set automatically in the stream sample-spec.
Pulseaudio support for other sample formats

Changes in v3:
	Dropped useless reverse endian code

Changes in v2:
	* DSD support
	* Cleanup

At some point the comment was probably true, but recent
versions of pulseaudio have no trouble with any reasonable
selection of sample formats.

There are some exceptions:

* at present DSD is not (yet) supported in pulseaudio, so
  in the meantime DSD is supported by downsampling to
  a decent PCM spec

* pulseaudio supports U8, but not S8, vis-versa for mpd

* pulseaudio supports both packed and unpacked variants of
  S24 for both endian, but mpd apparently doesn't support
  non-packed 24bit samples, which is a little odd since the
  ALSA output plugin assumes it does and so seems to always
  fall back to packed for 24bit formats!?! (bug?)

I originally started this patch from the multi-format support
code in the ALSA plugin, and as such it still contains the
logic for fall-back formats, but whereas the ALSA plugin
attempts to open a stream, this isn't necessary in this case
since there's a pulse API for testing the validity of a
sample_spec.