NPE fix and fast class splitting

1. I noticed when producing a 142-page PDF with Twitter Bootstrap CSS that `ClassCondition ` was extremely inefficient, taking up about 38% of the time as seen with [YourKit](http://www.yourkit.com/java/profiler/). The split/create new array/compare algorithm was just very slow. See [this issue](https://github.com/orbeon/orbeon-forms/issues/1738) for more details.

  So instead, I implemented the class check like client libraries like jQuery do: with a simple string comparison. This, in my case, gets rid of this hot spot entirely.

2. The NPE fix is independent from this. I am not sure if this is in fact a proper fix, but that value could be null in some cases.