The modernize-use-std-print check would get confused if it had to
re-order field-width and precision arguments at the same time as adding
casts or removing calls to c_str().
Fix this by tracking the argument indices and combining c_str() removal
with argument re-ordering. Add missing test cases to lit check.