service: Add helper function for security type

Output a service security type for a properly detected security type
string.
config: Add option to specify WiFi security in a .config file

Add a 'Security' option to specify the WiFi security type. By default
the security mode is set to WPA PSK if a passphrase is present.
Configuring EAP takes precedence over this option.

Fixes CM-661
doc: Document the config file 'Security' option
gsupplicant: Check peer_mapping before removing items

Added a check in order to avoid glib assert warnings during
remove_interface call, when peer_mapping was already empty.
doc: Fix typo in config file Security option documentation
gsupplicant: Regroup a function for readability

Just a minor issue, g_supplicant_interface_is_p2p_finding() was not
declared along with other g_supplicant_interface_* functions.
gsupplicant: Add GONegociationRequest signal handler

This will be necessary to handle incoming connection request. Wifi
plugin will have to support the necessary callback to forward this request
to the core Peer Agent API where the user will be able to accept or
reject the connection.
agent: Fix Peer authorization reply WPS choice handling logic

If WPS details were not requested, any valid reply is enough for
accepting the request.
peer: Add a function to forward incoming connections to the agent

This lets the incoming connection to be handled through the agent. If
no agent is present, nothing will happen and the incoming connection
request will be ignored.
wifi: Add an extra check for pending wifi data

Got another segmentation fault on chicken and egg issue; it is
also necessary to check the device pointer.
wifi: Update pending wifi device list

Update p2p pending wifi device, if wifi is removed as well. Such
scenario occurs in a long delayed p2p group negotiation.
wifi: Forward the incoming P2P connection request to the core

Thus the core will be able to call the Agent and the user, finally, will
have the choice to accept or decline the incoming connection.
client: Support agent incoming Peer authorization request

Thus it is possible to accept or reject an incoming peer connection.
peer: Add debug message for peer state

In order to ease the debug task of peer state changes, add a debug
message for the old and new states.
ipconfig: Do not pass a NULL pointer to D-Bus

connman_inet_ifname() may return a NULL pointer e.g. if the interface
does not exist in the kernel anymore but connman isn't yet aware of
that. Passing a NULL pointer to D-Bus may result in an abort, so check
the return value.
gsupplicant: Remove peer group interface when group is finished

When a p2p group has finished, update corresponding peers group
interface.
gsupplicant: Update group_mapping when group finished

Just updating group_mapping accordingly, as a p2p group has been
signalled as finished.
service: Clean up two consecutive if statements in disconnect_service()

These two ifs can be combined into one.
network: Remove unused function connman_network_clear_error()
service: Clean up __connman_service_ipconfig_indicate_state()

Clean up the function by first doing a proper switch statement and
setting up a pointer to the ipconfig and state. Reuse the pointers
when setting the new state instead of comparing the method once again.