Performance improvements

Lots of memoization/caching to make things faster.  10,000 executions of date/time formatting in various locales used to take ~30 seconds.  Now that same number of executions takes 4 seconds.  Also added ability to preload resources.