repo: Make the ordering consistent between abort/complete_transaction

This just makes the functions nicer to stare at.

https://bugzilla.gnome.org/show_bug.cgi?id=707644
repo: Make OSTreeCommitModifier introspectable

Callbacks need GDestroyNotifies to be usable from bindings.

https://bugzilla.gnome.org/show_bug.cgi?id=707644
repo: Make prepare_transaction introspectable

We need to document the out pointer as an out pointer.

https://bugzilla.gnome.org/show_bug.cgi?id=707644
repo: Move commit code to another file

ostree-repo.c is a bit too big, and most of the commit code is
fairly standalone.

https://bugzilla.gnome.org/show_bug.cgi?id=707644
repo: Rename "stage" to "write" in the API

An earlier version of this API acted like git in that some objects
would be staged in a temporary directory which would be then committed
in one go by moving files around. The API doesn't match most users
expectations though, as while the stage is nice as a high-level API
it isn't really suited for low-level APIs.

While the stage was removed, the APIs were never renamed. Rename
them now so that they match expectations.

https://bugzilla.gnome.org/show_bug.cgi?id=707644
repo: Move the transaction stats to a separate struct

This is much easier for callers to handle, and simplifies
the API a lot.

https://bugzilla.gnome.org/show_bug.cgi?id=707644
repo: Make abort_transaction silently succeed if we're not in a transaction

This helps callers out a lot, and means we can always call abort_transaction
at the end of a function.

https://bugzilla.gnome.org/show_bug.cgi?id=707644
repo: Move the scanning hardlinks optimization out of prepare_transaction

This is just a terrible API to have. Make the scanning a separate method,
and document it as an optimization.
Move ref writing to be transaction-based

Rather than having separate write_ref calls, make clients start a
transaction, add some refs, and then commit it. While this doesn't
make it 100% atomic, it makes it easier for us to use an atomic
model, and it means we don't do as much I/O updating the summary
file and such.

https://bugzilla.gnome.org/show_bug.cgi?id=707644