gsupplicant: Add a way to set primary and secondary P2P devices types

This will be used by the wifi plugin to set specific devices types.
wifi: Support a dedicated configuration file

In order not to overload ConnMan's main.conf with wifi plugin specific
settings (aka wpa_supplicant's settings...), let's have a quick
dedicated config file. Currently the 2 supported settings are used for
P2P and thus are not mandatory to be set, thus ignoring any errors
related to parsing this file to make it simple.
plugins: Add a wifi.conf configuration file template for the wifi plugin

This specific file, installed in /etc/connman/, can be used to set
specific values related to wifi plugin only.
gsupplicant: Add a way to know a peer that tried an incoming connection

Thus it will be possible to handle a connection failure properly in the
wifi plugin, so it will not request the agent for a retry.
wifi: Silently go back to idle if a peer failed on incoming connection

Thus peer core will not ask for a retry.
wifi: Revert wifi.conf file and its properties handlers in wifi plugin

This feature is wrongly implemented, and it will be reimplemented
properly while intergrating ConnMan with systemd-hostnamed.
gsupplicant: Remove support for setting P2P SecondaryDeviceTypes

ConnMan will not set secondary device types. PrimaryDeviceType will be
the only one handled.
machine: Integrate ConnMan with systemd-hostnamed

Currently only the machine type (chassis) is provided.
wifi: Set the device type from the value returned by the core

The device type follows the P2P specs and is filled in based on the
value given by the core.
gsupplicant: Configure device with WPS PBC method only

Thus incoming connection will not try to use WPS PIN method. This
enforces connman to support only WPS PBC on incoming connection.
manager: Fix an issue when verifying Peer Service parameters

Content of the pointer should be checked, not the pointers themselves.
peer: Append Peer Service content according to the signature

This fixes this issue:

connmand[14481]: src/peer.c:append_existing_and_new_peers() new
/net/connman/peer/peer_106f3f7a6c37_8ac9d0c0da67
process 14481: Writing an element of type array, but the expected type
here is struct
The overall signature expected here was '' and we are on byte 175 of
that signature.
File "../../dbus/dbus-marshal-recursive.c" line 1675 process 14481
should not have been reached: bad array element or variant content
written
  /lib/x86_64-linux-gnu/libdbus-1.so.3(+0x48ced) [0x7ffff78a3ced]
  /lib/x86_64-linux-gnu/libdbus-1.so.3(+0x4cae9) [0x7ffff78a7ae9]
  /lib/x86_64-linux-gnu/libdbus-1.so.3(+0x3ae6f) [0x7ffff7895e6f]
  /lib/x86_64-linux-gnu/libdbus-1.so.3(+0x1eec0) [0x7ffff7879ec0]
  /lib/x86_64-linux-gnu/libdbus-1.so.3(+0x1f254) [0x7ffff787a254]
  /lib/x86_64-linux-gnu/libdbus-1.so.3(dbus_message_iter_open_container+0x348)
[0x7ffff7880bc8]
  /home/jku/src/connman/src/connmand() [0x48039c]
  /home/jku/src/connman/src/connmand(connman_dbus_property_append_array+0x9f)
[0x4672df]
  /home/jku/src/connman/src/connmand() [0x480889]
  /home/jku/src/connman/src/connmand() [0x48092a]
  /home/jku/src/connman/src/connmand() [0x480994]
  /lib/x86_64-linux-gnu/libglib-2.0.so.0(g_hash_table_foreach+0x60)
[0x7ffff7b06240]
  /home/jku/src/connman/src/connmand() [0x4677b2]
  /home/jku/src/connman/src/connmand() [0x480446]
  /lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x4a613) [0x7ffff7b17613]
  /lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_dispatch+0x15d)
[0x7ffff7b16b6d]
  /lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x49f48) [0x7ffff7b16f48]
  /lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_loop_run+0xc2) [0x7ffff7b17272]
  /home/jku/src/connman/src/connmand() [0x40feaa]
  /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5) [0x7ffff6985b45]
  /home/jku/src/connman/src/connmand() [0x41012a]

Program received signal SIGABRT, Aborted.
0x00007ffff6999077 in __GI_raise (sig=sig@entry=6)
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  0x00007ffff6999077 in __GI_raise (sig=sig@entry=6)
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x00007ffff699a458 in __GI_abort () at abort.c:89
#2  0x00007ffff78a7b04 in _dbus_abort () at ../../dbus/dbus-sysdeps.c:91
#3  0x00007ffff7895e6f in _dbus_real_assert_not_reached (
    explanation=explanation@entry=0x7ffff78af988 "bad array element or
variant content written",
    file=file@entry=0x7ffff78af1e8 "../../dbus/dbus-marshal-recursive.c",
    line=line@entry=1675) at ../../dbus/dbus-internals.c:943
#4  0x00007ffff7879ec0 in writer_recurse_init_and_check (sub=0x7fffffffde70,
    container_type=97, writer=<optimized out>)
    at ../../dbus/dbus-marshal-recursive.c:1675
#5  _dbus_type_writer_recurse_contained_len (
    writer=writer@entry=0x7fffffffdf40,
    container_type=container_type@entry=97,
    contained_type=contained_type@entry=0x7fffffffde00,
    contained_type_start=contained_type_start@entry=0,
    contained_type_len=<optimized out>, sub=sub@entry=0x7fffffffde70,
    is_array_append=0) at ../../dbus/dbus-marshal-recursive.c:2060
#6  0x00007ffff787a254 in _dbus_type_writer_recurse (
    writer=writer@entry=0x7fffffffdf40,
    container_type=container_type@entry=97,
    contained_type=contained_type@entry=0x7fffffffde00,
    contained_type_start=contained_type_start@entry=0,
    sub=sub@entry=0x7fffffffde70) at ../../dbus/dbus-marshal-recursive.c:2119
#7  0x00007ffff7880bc8 in dbus_message_iter_open_container (
    iter=iter@entry=0x7fffffffdf30, type=type@entry=97,
    contained_signature=contained_signature@entry=0x48efe7 "{sv}",
    sub=sub@entry=0x7fffffffde60) at ../../dbus/dbus-message.c:2889
#8  0x000000000048039c in connman_dbus_dict_open (dict=0x7fffffffde60,
    iter=0x7fffffffdf30) at ./include/connman/dbus.h:94
#9  append_peer_services (iter=iter@entry=0x7fffffffdf30,
    user_data=user_data@entry=0x71ddd0) at src/peer.c:300
#10 0x00000000004672df in connman_dbus_property_append_array (
    iter=iter@entry=0x7fffffffe010, key=key@entry=0x493973 "Services",
    type=type@entry=101,
    function=function@entry=0x480350 <append_peer_services>,
    user_data=user_data@entry=0x71ddd0) at src/dbus.c:224
#11 0x0000000000480889 in connman_dbus_dict_append_array (
    key=0x493973 "Services", type=101,
    function=0x480350 <append_peer_services>, user_data=0x71ddd0,
    dict=0x7fffffffdfc0) at ./include/connman/dbus.h:156
#12 append_properties (iter=iter@entry=0x7fffffffe080,
    peer=peer@entry=0x71ddd0) at src/peer.c:328
#13 0x000000000048092a in append_peer_struct (key=key@entry=0x7137d0,
    value=value@entry=0x71ddd0, user_data=user_data@entry=0x7fffffffe240)
    at src/peer.c:372
#14 0x0000000000480994 in append_existing_and_new_peers (key=0x7137d0,
    value=0x71ddd0, user_data=0x7fffffffe240) at src/peer.c:402
#15 0x00007ffff7b06240 in g_hash_table_foreach (hash_table=0x6f1a40,
    func=0x480940 <append_existing_and_new_peers>, user_data=0x7fffffffe240)
    at /build/glib2.0-dt6trg/glib2.0-2.42.0/./glib/ghash.c:1550
#16 0x00000000004677b2 in __connman_dbus_append_objpath_dict_array (
    msg=msg@entry=0x706190,
    function=function@entry=0x4804e0 <peer_append_all>,
    user_data=user_data@entry=0x0) at src/dbus.c:404
#17 0x0000000000480446 in peer_send_changed (
    data=<error reading variable: value has been optimized out>)
    at src/peer.c:450
#18 0x00007ffff7b17613 in g_timeout_dispatch (source=0x719290,
    callback=<optimized out>, user_data=<optimized out>)
    at /build/glib2.0-dt6trg/glib2.0-2.42.0/./glib/gmain.c:4520
#19 0x00007ffff7b16b6d in g_main_dispatch (context=0x6ef540)
    at /build/glib2.0-dt6trg/glib2.0-2.42.0/./glib/gmain.c:3111
#20 g_main_context_dispatch (context=context@entry=0x6ef540)
    at /build/glib2.0-dt6trg/glib2.0-2.42.0/./glib/gmain.c:3710
#21 0x00007ffff7b16f48 in g_main_context_iterate (context=0x6ef540,
    block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>)
    at /build/glib2.0-dt6trg/glib2.0-2.42.0/./glib/gmain.c:3781
#22 0x00007ffff7b17272 in g_main_loop_run (loop=0x6d3220)
    at /build/glib2.0-dt6trg/glib2.0-2.42.0/./glib/gmain.c:3975
#23 0x000000000040feaa in main (argc=1, argv=0x7fffffffe598)
    at src/main.c:689

Reported-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
peer: Use correct helper function to append WiFiDisplayIEs

The fixed array is to be inserted into a dict entry.