Fixed some WebUndefined errors.

I was getting webundefined errors becuase the page isn't fully setup by
the time I got the mapViewDidFinishLoadingMap call. I modified the
MapKit.html file to load things synchronously to avoid the
mapViewDidFinishLoadingMap getting called before the page is fully
loaded.  I also updated the demo to use ARC (GC was causing build
warnings), and moved some private code around a little.