optimization: filter-out non-system keywords early on

There's an easy heuristic -- if a flag doesn't start with backslash or the
dollar sign, it cannot possibly be a systemwide flag, and therefore it doesn't
make sense to look for it in the list of predefined system flags.

A rough measurement indicates cca. 1% speedup on the test_Imap_Threading
benchmark, which is pretty nice, I would say.

Btw, there are hints [1] [2] that the user-defined keywords are case insensitive
as well. However, that's a rather complicated subject which touches on keywords
being (or not being) restricted to 7bit, and as such I do not really want to
open *this* can of worms.

[1] http://tools.ietf.org/html/rfc5232#section-3
[2] http://marc.info/?l=imap&m=96057337517863&w=2

REVIEW: 116642
Allow shortcuts for Network Access mode switching

REVIEW: 116734
Adding proper credits for Pavel Sedlák
refactoring: prefer ternary operator over invoking a single method via almost identical lines