session_policy_local: Do not free policy on load error

When we open the policy file and try to parse we might run
into an error. Instead of freeing the policy we just need
to reset it to the defaults and then try to apply the new settings.
We should reallyt not unref the policy on the error case because
the policy lifetime is attached to the lifetime of the file not
on the result of the parsing.
session_policy_local: Load policy when a new file is added

When a file is just added (not modified) we need also to parse it.
session: Add "_t" postfix to callback typedef

Be more consistent with the rest. Also shorten the a bit to verbose
name of the callback function.
session_policy_local: Use callback helpers

Use the generic callback helpers to encapsulate struct create_data.
In a later patch we will add some more data elemets to struct
create_data. That is the reason why it is not remove here.
dbus: Use callback helpers

Use the global callback helpers instead using the local version.
dbus: Add connman_dbus_get_connnection_unix_user()
session: Do not fail when creating default policy configuration

Do not handle the small alloc failures because glib will abort
when memory is tight anyway.
session_policy_local: Do not handle small allocation

Let's remove the small allocations error path because glib will
abort on memory exhausting anyway. Basically we remove dead code.
session_policy_local: Refactor SELinux context parser

selinux_context_reply() should handle the 'type' conversion of
data it gets from D-Bus.
session_policy_local: Add some more debug infos
session_policy_local: Print warning if loading of policy fails

Also continue reading the rest of the policy files when starting up.
This makes the startup behavior consistent with the runtime
behavior.
session_policy_local: Track policy data structure in a separate list

We want to make the lifetime of the policy data structure independent
of the policy_hash table.
session_policy_local: Use policy_hash only to track the policy files

Let's move the owner ship to the policy_list. The policy_hash is
only used to lookup the policy data structure.

This patch removes the requirement that the 'ident' is key to lookup
the policy data. Now we are able to define set of rules how we want
associate the file with a session.
session_policy_local: Rename policy_hash to file_hash

Which reflects the new usage of the hash much better.
session_policy_local: Rename ident to filename

ident is not shared anymore between the session policy and
the file policy. Let's make this clear be renaming this member.
session_policy_local: Split LSM context ident from filename

Separate the id which associates the file and the session.
find_policy_by_file() and find_policy_by_lsm() contain the logic which
associates the configuration file with a session.
session_policy_local: Retrieve UID/GID from session user

When the session core ask to create a configuration, then we
first ask the D-Bus server which UID/GID the session belongs to.
If possible we also ask for the SELinux context. Then we try
to figure out which file containts the configuration for
SElinux, UID or GID identification.

The order of matching preference is SELinux, UID and finally GID.
It is possible to run a mixed configuration but not really recommended.
There might be dragons.
session-test: Add tests for session_policy_local

Use the UID as identification.
inet: Add functions to setup fwmark to routing table
inet: Add function to setup default route to a routing table