Solves problem when course components have non-numeric values for grade-weight

Some of the xblock modules store weight as a string value when parsing the value from their xml definition. This code change ensures that we have a numeric value for the calculation, or one will get a ValueError raised, really just a few lines earlier than one would have otherwise received a problem.