Bug 1146611 - Cannot discover EAP6.0.1: supportsMatching method fails with IllegalArgumentException

EAP 6.1.0 version.txt file content is: "JBoss Enterprise Application Platform - Version 6.0.1 GA"
As a consequence, the version detected will be "6.0.1 GA" (notice the space instead of a dot)

Give such version strings a chance to make a valid OSGiVersion instance (avoid IllegalArgumentException)

If the version is still not matching the expected pattern, then supportsPatching default to false

Also:
* some perf improvements:
** use already compiled PATTERN instead of recompiling on each call of String#split or String.replaceAll
** use some OSGiVersion constants to avoid parsing over and over again
* some code cleanup (no longer use deprecated methods, remove unused param in private method, unchecked warning)

(cherry picked from commit 640a88cb2f126d583e46fc6b5a24f075df8d7535)