Automatic application state events handling added

automatic pause (on app entering background) and resume animation on
application enter in it's active state