pactl: Add unloading modules by name.

pactl should allow unloading modules by name.

If there are multiple modules with the same name all
of them will be unloaded.

BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=48289
pacmd: Add unloading modules by name.

pacmd should allow unloading modules by name.
The command_unload() function was expanded to handle names while
unloading modules.

If there are multiple modules with the same name all
of them will be unloaded.

BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=48289
x11: fix the wrong parameter sequence in pax11publish
device-port: Create the profiles hashmap at initialization.

I doesn't make sense to require all callers of
pa_device_port_new() to create the hashmap themselves. There
are and there will be no cases where a port without any
profiles would be desired.
bluetooth: Add ports to the bluetooth sink/source

The bluetooth device should have ports so we can attach a latency to
the ports.

Every profile (a2dp, hsp...) has his own set of ports depending on the
number of sinks and sources it provides.
device-port: Remove an out-of-date comment.
modules: Use pa_streq instead of strcmp.
pulsecore: Use pa_streq instead of strcmp.
tests: use pa_streq instead of strcmp
daemon: use pa_streq instead of strcmp
native: Don't save device, volume or mute of new streams.

Specifying the volume when creating a new stream is not an
equivalent act as setting the volume with a volume control
application. When creating a new stream, stream-restore
shouldn't save the volume, but when changing the volume,
then saving it is ok. For example, when I say
"paplay --volume=10000 somefile.wav", I mean that I want the
new stream to have volume 10000. I don't mean that also
future paplay invocations (without the --volume option)
should have that same volume.

This patch effectively reverts
546bcf3f2f9711f0d08c21c3b775994844e7e2a2.
role-cork: Fix a minor leak
core-util: Add a pa_split_in_place() string utility function

For specialised uses of pa_split() such as finding substrings for
comparison, this avoids the need to repeatedly allocate and deallocate
memory.
core-util: Make pa_make_secure_dir() act like mkdir -p

This makes pa_make_secure_dir() create any missing parent directories in
the given path as well. This is useful, for example, on a pristine
system with a clean $HOME that needs ~/.config/pulse/ to be created when
~/.config does not exist.
auth: Create cookie directory if it doesn't exist

Makes sure the cookie directory exists before trying to create the
cookie. This might be the case on freshly installed headless systems.
bluetooth: Fix bluetooth.nrec property not updated

PropertyChanged signal of org.BlueZ.MediaTransport is processed in
pa_bluetooth_transport_parse_property() which updates t->nrec.
This is called by :
- First by filter_cb() of bluetooth-util.c
- Then by filter_cb() of module-bluetooth-device.c which retrieve value
  of t->nrec before calling parse function, then it checks if t->nrec
  has changed before updating bluetooth.nrec property.
  As t->nrec has alreday been changed during first process, property
  update is never performed.

This patch creates a new hook in pa_bluetooth_transport called
PA_BLUETOOTH_TRANSPORT_HOOK_NREC_CHANGED.
The hook is fired by bluetooth-util.c when the transport's NREC
property changes.
module-bluetooth-device.c won't listen the PropertyChanged signal of
MediaTransport anymore. Instead, it will use the hook in
pa_bluetooth_transport to get a notification when the NREC property
changes, and update the sink or source proplist accordingly.

const qualifier for returned pointer of
pa_bluetooth_discovery_get_transport() is removed.
core-util: use the generic PATH_MAX variant of pa_realpath on Mac OS X

realpath() on OS X behaves GNUish and accepts NULL for resolved_name
only on 10.6 and higher. Older versions will crash, if resolved_name is
NULL.

All versions define PATH_MAX, though. Better play it safe and use the
generic PATH_MAX version of pa_realpath on Mac OS X systems.

Signed-off-by: Mihai Moldovan <ionic@ionic.de>
device-port: Add a latency variable to the port struct

A latency offset variable was added to the port struct and a function to
set the latency offset.

The latency offset does nothing for now, but it will be later added to
the sink/source latency.
sink, source: Add a latency offset which is inherited from the port

A latency offset variable was added to the sink/source struct.

Also a function was introduced to update the latency offset of the
sink/source and a new message type was introduced so we can send the latency
offset to the IO thread.

The latency offset is automatically populated with the latency from the
currently active port.
pacmd: Add functions to handle the latency offset

pacmd was extended so it can handle the new latency offset.

A new function was added so we can set the latency also the list
commands were extended to print the latency offset on the ports.