"End session" method being called before "session duration" method

Changed event processing order, so that end_session will be called before session duration.

The way it was implemented, end_session method would never be called as the mobile always sent session_duration method with end_session, as well.

So, the request would be treated by session_duration and end_session would never be updated.