FIX: Admin panel referral stats not counting topics correctly

Due to what seems to be a bug in ActiveRecord, the distinct: true option
is not recognized on counts with string column names. This commit fixes
that by moving the DISTINCT into the count string.

For robustness, the integration spec for IncomingLinksReport was
rewritten to be an actual integration spec, running the actual interface
on actual fake data.
Merge pull request #2999 from riking/fix_top_referrers_topic_count

FIX: Topic referrals by user were wrong
Merge pull request #3003 from techAPJ/patch-2

upload bulk invite csv file to /public/uploads/csv
ooops. forgot the args :fired:
FIX: don't show the banner topic on error page
FIX: Suspended users should have links stripped from their profiles.
FEATURE: export sso data if sso is enabled
FIX: Load order issue / header category badge when not surpressed
No need to call it `Discourse.TopicRoute` -- that is done automatically
by the compatibility layer. cc @ZogStrIP
update rails master
FEATURE: implement SSO provider on Discourse so Auth can be farmed to it
FEATURE: pass return_sso_url to SSO endpoints, for easier return
FIX: click counter for attachments
remove useless 'puts'
fixing reply-tab bug and user profile background adjustment
Merge pull request #3006 from awesomerobot/master

fixing reply-tab bug and user profile background adjustment
Use far fewer admin user list routes, instead pass the query as a
parameter.
UX: Consolidate "Admins" and "Moderators" into "Staff" on admin users
list
FEATURE: restrict some user fields for TL0 users when viewed by anonymous users
FIX: auto-closing attribution when a TL4 user auto-closes a topic
FEATURE: "Suspect" users list in admin.