Don't leak password in login_prompt_do_{specific, user)

login_prompt_do_specific() and login_prompt_do_user() both
set GkmWrapPrompt::prompt_data to either memory which must be freed
with egg_secure_memory_strfree (through a call to
auto_unlock_lookup_*) or to const memory which must not be freed
(through a call to gkm_wrap_prompt_request_password).

These methods currently assume the password memory does not need
to be freed, which leads to this leak in test-login-auto (line numbers
from 3.13.91-2-g45bb5be):

==2190== 5 bytes in 1 blocks are definitely lost in loss record 17 of 1,294
==2190==    at 0x40F8E4: egg_secure_alloc_full (egg-secure-memory.c:1056)
==2190==    by 0x417F5E: egg_secure_alloc (gkm-wrap-login.c:42)
==2190==    by 0x419157: gkm_wrap_login_lookup_secret (gkm-wrap-login.c:409)
==2190==    by 0x407E8D: auto_unlock_lookup_object (gkm-wrap-prompt.c:198)
==2190==    by 0x40B9B0: login_prompt_do_specific (gkm-wrap-prompt.c:1453)
==2190==    by 0x40C13A: gkm_wrap_prompt_do_login (gkm-wrap-prompt.c:1591)
==2190==    by 0x406384: auth_C_Login (gkm-wrap-layer.c:706)
==2190==    by 0x40472A: test_specific (test-login-auto.c:156)
==2190==    by 0x5E0A27A: test_case_run (gtestutils.c:2059)
==2190==    by 0x5E0A602: g_test_run_suite_internal (gtestutils.c:2120)
==2190==    by 0x5E0A6C4: g_test_run_suite_internal (gtestutils.c:2131)
==2190==    by 0x5E0A6C4: g_test_run_suite_internal (gtestutils.c:2131)
==2190==    by 0x5E0A847: g_test_run_suite (gtestutils.c:2184)
==2190==    by 0x5E09551: g_test_run (gtestutils.c:1488)
==2190==    by 0x410851: testing_thread (egg-testing.c:142)
==2190==    by 0x5E0D2F4: g_thread_proxy (gthread.c:764)
==2190==    by 0x3B7AE07F34: start_thread (pthread_create.c:309)
==2190==    by 0x3B7AAF4C3C: clone (clone.S:111)

https://bugzilla.gnome.org/show_bug.cgi?id=738508
Don't leak password data in gkm_wrap_prompt_do_credential

Memory returned by auto_unlock_lookup_object() must be freed
while memory returned by gkm_wrap_prompt_request_password() must
not be freed. Depending on the situation, CredentialPrompt::password
will contain one or the other, and currently this field is never
freed, causing leaks when the password comes from
auto_unlock_lookup_object().

This commit will always free CredentialPrompt::password when it's
no longer needed, and will create a copy of the returned string
when gkm_wrap_prompt_request_password() is called.

This fixes (line numbers from 3.13.91-2-g45bb5be):

==2190== 8 bytes in 1 blocks are definitely lost in loss record 58 of 1,294
==2190==    at 0x4A0645D: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==2190==    by 0x5DE6DE6: g_malloc (gmem.c:97)
==2190==    by 0x5E024B5: g_memdup (gstrfuncs.c:384)
==2190==    by 0x41296C: gkm_template_set (gkm-attributes.c:600)
==2190==    by 0x4129F0: gkm_template_set_value (gkm-attributes.c:614)
==2190==    by 0x419BCD: mock_secret_C_CreateObject (mock-secret-store.c:174)
==2190==    by 0x40646E: wrap_C_CreateObject (gkm-wrap-layer.c:741)
==2190==    by 0x418985: find_login_keyring_item (gkm-wrap-login.c:254)
==2190==    by 0x4190AF: gkm_wrap_login_lookup_secret (gkm-wrap-login.c:396)
==2190==    by 0x407E8D: auto_unlock_lookup_object (gkm-wrap-prompt.c:198)
==2190==    by 0x40B9B0: login_prompt_do_specific (gkm-wrap-prompt.c:1453)
==2190==    by 0x40C13A: gkm_wrap_prompt_do_login (gkm-wrap-prompt.c:1591)
==2190==    by 0x406384: auth_C_Login (gkm-wrap-layer.c:706)
==2190==    by 0x40472A: test_specific (test-login-auto.c:156)
==2190==    by 0x5E0A27A: test_case_run (gtestutils.c:2059)
==2190==    by 0x5E0A602: g_test_run_suite_internal (gtestutils.c:2120)
==2190==    by 0x5E0A6C4: g_test_run_suite_internal (gtestutils.c:2131)
==2190==    by 0x5E0A6C4: g_test_run_suite_internal (gtestutils.c:2131)
==2190==    by 0x5E0A847: g_test_run_suite (gtestutils.c:2184)
==2190==    by 0x5E09551: g_test_run (gtestutils.c:1488)
==2190==    by 0x410851: testing_thread (egg-testing.c:142)
==2190==    by 0x5E0D2F4: g_thread_proxy (gthread.c:764)
==2190==    by 0x3B7AE07F34: start_thread (pthread_create.c:309)
==2190==    by 0x3B7AAF4C3C: clone (clone.S:111)

https://bugzilla.gnome.org/show_bug.cgi?id=738508
daemon: Fix GStrv leak in DBus message handler

https://bugzilla.gnome.org/show_bug.cgi?id=738508
asn1x: Sanitize use of asn1_set_value/asn1_take_value

Most callers of asn1_set_value() seems to assume this function will take
ownership of the passed in GBytes, while it actually takes an additional
reference.

https://bugzilla.gnome.org/show_bug.cgi?id=738508
Port gnome-keyring-daemon to GDBus

This commit ports gnome-keyring-daemon from libdbus1 to GDBus.
Unfortunately it's not really possible to split this commit into
multiple while keeping the code building.

Noteworthy is the different approach that GDBus allows us to use;
instead of filtering every message and writing our own internal message
routing, we can more naturally use generated skeletons and
register/unregister them on the bus as needed.

https://bugzilla.gnome.org/show_bug.cgi?id=622905
egg: remove egg-dbus.[ch]

They're not used anymore.

https://bugzilla.gnome.org/show_bug.cgi?id=622905
build: remove dbus checks

We don't depend on libdbus anymore.

https://bugzilla.gnome.org/show_bug.cgi?id=622905
test: adapt for gdbus-codegen PropertiesChanged behavior

Before using gdbus-codegen for the secret objects, property signals
would be emitted synchronously before returning the method call.
Generated GDBus skeletons will queue signalling of property changes in
an idle, so we can't rely on the same timing behavior as before.

See code comment for more details.

https://bugzilla.gnome.org/show_bug.cgi?id=622905
Update .gitignore

https://bugzilla.gnome.org/show_bug.cgi?id=622905
dbus-service: make sure all clients are registered before handling requests

To ensure this, we install a filter on our DBus connection, and remove
the call to fetch the caller credentials, since we don't use them (and
we wouldn't want to do that from the message processing worker thread).
dbus-environment: plug a memory leak
dbus-session: don't forget to assign signal registration ID
dbus: cleanup error handling
build: don't put generated files in $(srcdir)
dbus: plug some memory leaks
dbus-error: check for error != NULL

It's a programmer error to call this without a GError.
dbus-objects: return correct DBus error codes
dbus-error: fix error message