Use G_BEGIN_DECLS and G_END_DECLS

The header files wrapped with extern "C" to make them work well with
C++. This requires an #ifdef so that it only affects C++ compilers. GLib
defines convenience macros which we can use to achieve the same thing
but with less code.

Signed-off-by: Marcus Karlsson <mk@acc.umu.se>
Implement support for sending the examine command

The examine command selects a mailbox in read-only mode. Add support for
sending the examine command.

Signed-off-by: Marcus Karlsson <mk@acc.umu.se>
Implement support for sending the select command

The select command selects a mailbox in read-write mode. Add support for
sending the select command.

Signed-off-by: Marcus Karlsson <mk@acc.umu.se>