This change breaks up the rather large TextBuffer::save() into separate
functions. Most notably the privileged code path that requires a D-Bus
helper invocation is now better separated from the unprivileged local
code path.
This change also introduces a small change in behaviour: If file open
failed for other reasons than lacking permissions the invocation of the
D-Bus helper is skipped, since there is no hope of the helper helping us
in this case.
This is preparatory work for further security related improvements
of the katetextbuffer privilege escalation handling.