Refactor utils.h for readability

Give code some consistency and flip if-else statements in `int xtoi()` to enhance readability and performance.
Merge pull request #12 from impinball/patch-1

Refactor utils.h for readability