Logging improvements

* Added MYLoggingCallback, to allow redirection of logs
* On iOS devices, always log via NSLog, because stderr doesn't get saved
  anywhere that can be viewed later.