Cleanup weighted predition related code
- Rename members of WPScalingParam to conform to guidelines
- Avoid casts from const to non-const types
- Modify getWpScaling function to handle case where the reference index is negative (see #733)
- Add helper function isWeighted to determine whether weighting parameters are present for any colour component
- Fix some indentation issues