Moved utility functions to util.[ch]
Merge pull request #155 from cesanta/utils

Moved utility functions to util.[ch]