Fix nefarious divide by zero bug

A subtle x/0 bug creaped into get_h() in the weights calcultion.
If the maximum stat was 0 (for instance, absorb when not using a shield),
the calculation would be x/0, resulting in Inf (infinity) being assigned
as the weight.
Searching for weight > 10 (an arbitrary kludge value, but anything larger
than 2 should work) and reassigning that to the identity
(multiplicative hear, so 1) fixes the problem.

Also increase max iteration of sqp() to 400, for greater accuracy in results.