Upper bound optimization

Remove weightSum() method and compute it inline, in a loop written for another
purpose, to avoid scanning the particle list twice.
Optimize trial()

- Store best ipper bound action instead of computing it each time.
- Reserve vector space before push_back()-ing