Fix invalid AnsiDetector after migration to jline2
prefer removeClassCacheEntry accessor
code style Declared members as indicated by TypeChecked