compat: Check return value of mmap() properly

https://bugs.freedesktop.org/show_bug.cgi?id=68525
Avoid multiple stat() calls for same file

As a side effect we can also not use the dirent.d_type field

https://bugs.freedesktop.org/show_bug.cgi?id=68525
p11-kit: Rename list.c to lists.c to simplify debugging
debug: Add missing 'tool' flag to debug flags
debug: Allow debug lines longer than 512 characters

Since fprintf (stderr, ...) already doesn't print atomically, we don't
lose any atomicity here. If we want to print atomically this will need
some further reworking anyway.
tool: Only include debug lines marked 'tool' when --verbose

Otherwise we get all sorts of overwhelming internal debugging
when someone specifies --verbose argument to a tool.
iter: Add new P11_KIT_ITER_WANT_WRITABLE iterator behavior

This allows us to try to get a RW session, but if not fallback
to a read-only session.
iter: Add p11_kit_iter_get_token() call

To get the already loaded CK_TOKEN_INFO during iteration for the
token that the current object is on.
iter: Add p11_kit_iter_set_uri() function

This is so we can set a filtering uri on the iterator after construction
iter: Add a p11_kit_iter_destroy_object() function

Handy function since this is a common need.
Add p11-kit style typedefs for iter and uri

In general we're slowly migrating towards the lower case style
for stuctures/objects.
trust: Correctly rewrite other objects in a modifiable persist file

There was a bug where we were rewriting the modified object
multiple times.
trust: Prefer parsing the persist format to PEM

This is because the persist format contains PEM, and if the PEM
parser gets it first, then it'll ignore the other non PEM data.
trust: Add index callback for when an object is removed

This allows a token to remove the file if desired
trust: Do reload object removals inside a loading block

So that validation/storage logic doesn't kick in if a file was
removed outside of p11-kit trust module.
trust: Refactor enumeration of certificates to extract

Because we want to use this same logic for listing trust
trust: Add support for removing trust token objects
trust: Add a list command to the trust tool

Lists with PKCS#11 URI's and some basic fields.
trust: Add 'trust anchor --remove' command

Also prevent --store from storing an anchor multiple times
trust: Document the new command line trust tool