Eliminate the always-false half of a conditional.

In the else clause of an if (bp) {...} else {...}, there was code
conditioned on (bp && bp->name), which is necessarily false.  So ditch
that code and keep *its* else clause unconditionally.
Petty tidy-up in verify_vars.c

Moved a commented-out line, and commentary on it, to after the
declaration of the variable it references.  Split a conditional with
&& on the end of the first line instead of at the start of the second;
and changed x == false to !x.  Made existing_value const by changing
its initialization to a ?: initialization.

Canonicalise indentation in code that reports redefinition of
constants for the AGENT_TYPE_COMMON.  Split some long lines.
Inlined the value of a returned variable where it hasn't been
modified since its constant initializer.
Avoid shadowing a returned variable.

VerifyVarPromise() has a function-scope variable that it returns.  It
also had a pair of nested variables with the same name (result) that
held an int (not a PromiseResult at all) that got returned if
negative.  The latter shadowed the former, so I renamed it; and
returning them doesn't make sense for the return-type, so return the
outer variable.
Boring indentation fix in a test-policy.

Line up like things under one another.
Fix unused-parameter warning in eval_context.c

GetVariableTableForScope() only uses its ns argument in assertions;
so give it an ARG_UNUSED, but only #ifdef NDEBUG.
Add (verbose) logging of variable-setting.

When VariableTablePut sets a variable, log what we're doing at verbose
level.  Also swapped the two branches (set and amend) of the function
around, so that the if () { ... } else { ... } is ready for its second
half to become an else if (changed rval) { ... } at some later date
(to save heap traffic on fatuous "change" to same value); added a TODO
to do that !
Record which promise set each variable.

Preparation for fixing Redmine 1492: keep track of which Promise set a
variable, so that we can ask whether a later setting is by the same
promise (on a later pass) or a different one; in the former case we'll
always allow this, but the latter is only allowed when policy is free.
Add RvalWriteParts() for when we have only a const pointer for item.

When the item we have is a const void * (or other const pointer), we'd
have to cast away its constness in order to put it into an Rval to
pass to RvalWrite(), despite the fact that RvalWrite() only uses it as
a const pointer.  Also, RvalWrite() delegates unpacking of .item to
functions which do nothing else but check the type is right, which we
know it *is* because our calls to them are in relevant cases of a
switch on type; so we really don't need to pack the item into an Rval.
Merge pull request #1281 from ediosyncratic/clean-ups

Clean ups, log variable setting, record promise that set variable.