Generalize the overload resolution code to be based on estimating a cost for various overload options and picking the one with the minimal cost. Add a step that considers type conversions that are guaranteed to not lose information in function overload resolution. Print better diagnostics when we can't find an unambiguous match.