GitHub #159: Improve log handling to help C process handle errors

Many printf's replaced with mfp_log_* calls, which will log to stdout with
a tagged format that RPCHost can recognize.