Prevent big amount of sql queries for push service

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Merge branch 'performance-improvements' into 'master'

Performance improvements

Push 1k commits cause 1k sql queries to collect commit author. But this variable was used only in 20 commits (from 1000).
So we did 980 sql queries without using it. This MR fixes it.

See merge request !1250
Merge branch 'master' of github.com:gitlabhq/gitlabhq