Added an optimize flag to the beginRead() and beginWrite() methods.

This allows derived classes that override these methods to perform special
optimization. This is needed for instance for CombinedConfiguration; this
class has methods which need synchronized access, but do not require the
full combined configuration to be constructed. The alternative would be
to call the Synchronizer directly, but this is a source of trouble as it
circumvents the standard mechanisms for obtaining and releasing locks.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/configuration/trunk@1488573 13f79535-47bb-0310-9956-ffa450edef68
Adapted beginRead() and beginWrite() methods in CombinedConfiguration.

The readLock() and writeLock() methods were removed. They could cause
problems because they obtained locks without using the standard means. This
could break subclasses that rely on symmetric invocations of beginRead()/
endRead() and beginWrite()/endWrite() respective.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/configuration/trunk@1488575 13f79535-47bb-0310-9956-ffa450edef68