Fix error I introduced to cost_size docstring.
Clean up and add documentation to cost2thresh.