A Mass-Magnitude Relation for Low-mass Stars Based on Dynamical Measurements of Thousands of Binary Star Systems