Optimize: O(1) index lookup of map elements in a list

There was a big performance bottleneck with MapElementList, where
indexOf() was being used to look up indices in O(n) time.
Fixed|Mac OS X: Workaround for a GCC 4.0 C++ language issue

Apparently nested classes and friends aren't handled that well.
Refactor|libdeng2: String pattern formatting moved to its own method

Pattern formatting does not belong in LogEntry::asText(). Also
fixed a bug in detecting an escaped format character (%%).
Tests: Added a test for string pattern format

Demonstrates all the format features of String::patternFormat()
(and therefore String::operator %()).