Improve the implementation of BasicQueue's implementation class.

This new implementation of BasicQueue performs at most one
trailing to leading adjustment for any sequence of head operations.

What's different with respect to the previous version is that now
leading and trailing are reassignable variables, and mirror performs
the reverse copy from trailing to leading as a side-effect on
the current queue instead of returning a new queue. This side-effect
is purely internal to the implementation of the BasicQueue operation;
since leading and trailing are private variables, the effect is not
visible to clients of BasicQueue.

This new version of BasicQueue still defines purely functional
objects, in spite of the fact that they now contain reassignable fields.
All of the state is hidden away and is purely an implementation detail.