[WIP] Solver optimizations

Packagist's composer update is roughly 14 million function calls
- Literals on rule are now public: Reduction of ~500k function calls
- id on BasePackage is now public: Reduction of ~1.3m function calls
- ruleById on RuleSet is now public: Reduction of ~500k function calls
you should add a message saying it should be treated as read-only. For instance, Doctrine makes it proeminent in the phpdoc: https://github.com/doctrine/doctrine2/blob/30bf192cf4a7e0289ab113f44e80b16e6e02e456/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php#L208