Replace all printf's with ostream for efficiency in Librank

Replace printf with ostream to avoid unnecessary string
concatenations.

Test: compare showmap output before and after the change.
Test: output before the change:  https://paste.googleplex.com/4969678737768448
Test: output after the change:  https://paste.googleplex.com/6003596148604928
Bug: 232840435
Change-Id: I3450fd3396c64f463f6b4d6ed25720ead6ebcc26
1 file changed