MODE-2039 Fixed the import of documents which have the "isCheckedOut" flag set to "false".
MODE-2042: Test permissions for principals known to the security context
MODE-2042: Optimized permissions checks. Added Testcase
MODE-2035 Fixed the mode:lock node type which caused the reported problem. Also, this exposed another problem with the XmlNameEncoder - the fact that XML names cannot start with certain characters.