ruih: Make ServiceManager a singleton

Service was keeping information that belonged to ServiceManager and
basically constructing it in its static constructor to create a single
instance that was watching the file.

This commit moves all static members of Service to ServiceManager,
making it a full GObject and using the general singleton pattern we use
in Rygel.

This also fixes an potential issue in multi-homed hosts that the
static file-monitor would cancelled by Service's instance destructor if
one network interface went down.

Signed-off-by: Jens Georg <mail@jensge.org>
ruih: Remove locking

get_compatible_uis () and set_ui_list () can never be called from different
threads. It is not possible to modify the UI list while querying it.

Signed-off-by: Jens Georg <mail@jensge.org>
ruih: Minor style fixes

Signed-off-by: Jens Georg <mail@jensge.org>
ruih: Split get_compatible_uis into smaller functions

Signed-off-by: Jens Georg <mail@jensge.org>
core,ruih: Add XML node iterator and use it

Signed-off-by: Jens Georg <mail@jensge.org>
ruih: Allow null for protocols

The code checks for == null and returns true then. But if the variable
is not marked as nullable, vala will add g_val_return_if_fail (FALSE,…
to the beginning of the function.

Signed-off-by: Jens Georg <mail@jensge.org>
ruih: Style fixes for UIElem

Signed-off-by: Jens Georg <mail@jensge.org>
ruih: Style fixes for UIListing

Signed-off-by: Jens Georg <mail@jensge.org>
ruih: Fix style issues in FilterEntry

Signed-off-by: Jens Georg <mail@jensge.org>
ruih: Remove unreachable code

IconElem is created while iterating a list and icon_node->name is checked
before creating the element. It's impossible to pass a null-node here.

Signed-off-by: Jens Georg <mail@jensge.org>
ruih: Style fixes for IconElem

Signed-off-by: Jens Georg <mail@jensge.org>
ruih: Style fixes for ProtocolElem

Signed-off-by: Jens Georg <mail@jensge.org>
ruih: Plugin style fixes

Signed-off-by: Jens Georg <mail@jensge.org>
ruih: Style fixes for RuihServer

Signed-off-by: Jens Georg <mail@jensge.org>
ruih: Service style fixes

Signed-off-by: Jens Georg <mail@jensge.org>
ruih: Style fixes for ServiceManager

Signed-off-by: Jens Georg <mail@jensge.org>
fixup! ruih: Style fixes for IconElem
wip: Rework StringBuilder use

Signed-off-by: Jens Georg <mail@jensge.org>