Fix for current_viewer #3207
Fix for current_viewer #3207

The current_viewer is taken from the subdomain if the user was
previously authenticated. This covers api_key authentication (no
session).

Also we make sure to return nil if there's no authenticated user in the
context of the request. This is very important from a security
standpoint.

future-analytics/cartodb,nuxcode/cartodb,future-analytics/cartodb,splashblot/dronedb,UCL-ShippingGroup/cartodb-1,splashblot/dronedb,raquel-ucl/cartodb,DigitalCoder/cartodb,nyimbi/cartodb,CartoDB/cartodb,DigitalCoder/cartodb,nyimbi/cartodb,thorncp/cartodb,raquel-ucl/cartodb,nuxcode/cartodb,nyimbi/cartodb,dbirchak/cartodb,nuxcode/cartodb,dbirchak/cartodb,nyimbi/cartodb,bloomberg/cartodb,nuxcode/cartodb,bloomberg/cartodb,thorncp/cartodb,codeandtheory/cartodb,dbirchak/cartodb,dbirchak/cartodb,codeandtheory/cartodb,thorncp/cartodb,codeandtheory/cartodb,UCL-ShippingGroup/cartodb-1,future-analytics/cartodb,thorncp/cartodb,raquel-ucl/cartodb,splashblot/dronedb,splashblot/dronedb,codeandtheory/cartodb,DigitalCoder/cartodb,codeandtheory/cartodb,raquel-ucl/cartodb,UCL-ShippingGroup/cartodb-1,DigitalCoder/cartodb,DigitalCoder/cartodb,future-analytics/cartodb,bloomberg/cartodb,CartoDB/cartodb,CartoDB/cartodb,future-analytics/cartodb,dbirchak/cartodb,CartoDB/cartodb,thorncp/cartodb,splashblot/dronedb,nuxcode/cartodb,UCL-ShippingGroup/cartodb-1,UCL-ShippingGroup/cartodb-1,bloomberg/cartodb,bloomberg/cartodb,raquel-ucl/cartodb,nyimbi/cartodb,CartoDB/cartodb