Literals on rule are now public

This causes a reduction of ~500k function calls for packagist composer
update (~14 million total).
Make project id public

Reduction of rougly 1.3 million function calls on packagist update
Move public properties to top and document them
Make ruleById lookup table in rule set public

Saves about 500k function calls on a packagist update
Remove unnecessary pool reference from rules
Recreate getLiterals method for BC
Improve docblocks of public properties
Add back ruleById function for BC
Merge pull request #3481 from naderman/optimize-solver

Solver optimizations