Change naming of functions for obtaining variables

These are now all prefixed with what they are obtaining variables for (scope, document, bundle, …) which makes it easier to analyze/refactor the code.

Also change document_t’s settings function to document_settin
Avoid ref to static data when returning non-POD from Objective-C

Apparently clang (now?) support transferring non-POD types from and to Objective-C++ methods, eliminating the need for doing this by passing a (const) reference.
Move bundle requirement checking to bundles framework

This also generalizes it to being applicable to all bundle items (not just commands).
Handle “did-save” bundle item callback in OakTextView

While it’s easier to execute bundle items from a text view, it doesn’t work when saving documents that are not in the current text view.

This is an intermediate refactoring step — handling should (likely) end up in the DocumentSaveHelper class, but we need to improve dealing with command execution first, and by having the callback piggyback on the normal performBundleItem: method, we (temporarily) limit the code which use the command execution API, making refactorin
Obtain variables and scope context via ‘self’

This is instead of direct instance variable acce
Factor out deprecated variable collecting
Disambiguate function name
Add pwd argument to command runner

Previously this was only possible to change by setting PWD in the passed-in environment.
Consult text view delegate when setting up variables

The delegate provides file browser variables.
Rework setup/execution of drop commands

We now collect all variables (and working directory) prior to calling document::run() to remove the need for a callback.
Remove callback support from document::run
Let OakTextView pass an environment to document::run()

We no longer pass the bundle item by const-reference because it is now used (delayed) in a block and const-references are not captured by blocks (i.e. the lifespan is not extended).
Add operator<< for std::map

This is to allow chaining inserts and to avoid temporary variables when inserting maps returned from functions.
Don’t pass base environment to bundle_variable
Explicitly collect variables from different components
Let OakTextView set TM_CURRENT_THEME_PATH

Previously we relied on the delegate to set this, but a text view may not have a delegate. One could however argue that this is a “global” setting so should be set even when there is no text vi
Explicit variable setup for completion commands
Explicit variable setup for file browser commands
Explicit variable setup for app controller commands
Do not setup variables in document::run