Do not override company from user profile for closed period

When user changes private email in Gerrit it affects all marks made
by that user. If user has profile with closed periods and Gerrit email
is corporate then all marks for that periods will be still counted as
belonging to new company. The algorithm is changed to override profile
for open period only (thus assuming the situation when user changed
job and email but not updated the profile)

Closes bug: 1365735

Change-Id: I3ba1bb98eadf4ecd2eff75fc88744ffab7362940
Merge "Do not override company from user profile for closed period"