perf: use strtok_r + strtod / strtoull instead of scanf

mwprof spends most of its time in scanf. Parsing the string by hand reduced CPU
utilization by a third.

Change-Id: Id4a3dab276ab826684c8c45589fb81955e1e0688