Added a run method to Application, which begins a main loop. The main
loop is responsible for calling the render and update functions as well
as polling for events.