Cosmetic changes to follow our coding style. Also fixed incorrect
'waiting for friends' message while waiting for achievements.
Replaced template function to simplify setting online request data with
function (since template doesn't compile on linux without -std=gnu++0x or so).
Bugfix: onRaceEnd was not called for achievements (resulting in
achievements not being reset at end of a race).