Dirk make num cached frames dynamic

Problem
----------
iPad doesn't play nice with rain animation. This presumably holds also for other devices with relatively little memory. Although old laptops can suffer the same fate, 

Solution
-----------
Conditionally limit the amount of frames that are cached for rain animation, based on the client's useragent.