iptables: Alignment fixes

The alignment of entry, offset and target was not calculated properly.
This by chance worked for x86 but not for ARM.
nfacct: Make sure nfacct is there before accessing it
readme: Document kernel options needed by session

Session networking code needs these kernel options to work.
CONFIG_NETFILTER_XT_CONNMARK
CONFIG_NETFILTER_XT_TARGET_CONNMARK
CONFIG_NETFILTER_XT_MATCH_CONNMARK
main: Use gboolean type in GOptionEntry

The GOptionEntry options need to be of gboolean type as they are passed
as pointers. When the size of gboolean is different from the size of
bool, it will cause option variables to be overwritten by each other.

This was discovered by enabling the --nodaemon option which caused
option_dnsproxy to be overwritten to zero thereby disabling DNS
proxying altogether. Disabling DNS proxying forced ConnMan to write the
current nameserver entries directly into /etc/resolv.conf instead of
the loopback addresses. With DNS proxying disabled and no fallback
nameservers specified, no DNS entries were added to the DHCP server
messages and tethering functionality seemed to be broken also.
client: Add append function to D-Bus method call helper

An append function is needed when more complex arguments need to be
passed to ConnMan method calls.
client: Add helper function for adding a D-Bus dict
client: Initial session support

Add session creation, destroying, connection and disconnection
support. Automatically create a session if none exists when a
connect is done. Also ignore session messages while monitoring.
client: Add Session notification printing and Release handling

Handle Release and Update method calls. Set session connected state
from the Update method call.
client: Add support functions for Session Update message creation

Session uses 'Update' method call to set its properties.
client: Add Session configuration support

Support setting Session 'AllowedBearers' and 'ConnectionType'
properties.

Fixes CM-576
gsupplicant: Use uint32 instead of string for wep_tx_keyidx

We use a string to pass the WEP key index value, but wpa_supplicant's
DBUS API expects a uint32. In addition, wpa_supplicant wraps strings
into double quotes, which always returns 0 when wpa_supplicant tries
to extract an integer value from it with atoi(). For this particular
case, 0 happens to be the value we want.

Fix this so that we use the correct type.
log: Add rate limiting warn message
rtnl: Print out warning when WEXT newlink messages are seen
wifi: Fix a memory leak when trying to connect a disconnecting network
client: Fix setting session state to disconnected

Set session state to disconnect and print out a messages if the session
was connected.
doc: Fix typos in advanced-configuration.txt
doc: Fix typo of preferred

Document and accept correct spelling of 'preferred'. Note that the
incorrect spelling 'prefered' is still returned to keep API stable
(as documented in doc/service-api.txt).

Follow-up of commit 5b2bf526174ae44288cbaee5c410ffda02a9aa58.
client: Display correct spelling of preferred in connmanctl usage text

Incorrect spelling is accepted as well.
ipconfig: Accept correct spelling of preferred
config: Add functions trimming trailing whitespace when reading config values

Add __connman_config_get_string(), __connman_config_get_string_list(),
__connman_config_get_bool() which wrap corresponding GLib
g_key_file_get_*() functions.

GLib's functions trim leading, but not tailing whitespace.

These function trim (*_string) or ignore (*_bool) trailing whitespace
of config values in order to mitigate hard to spot configuration
errors.