Use different user.construct_public_followings_sql query depending on database backend.
This is done for performance reasons as a temporary fix for problems with 0.4.0.0 on MySQL. This madness is explained in issue https://github.com/diaspora/diaspora/issues/5014.

(cherry picked from commit 80075c13f4e45de4a1cc7b305b213ee693c66619)
Bump to 0.4.0.1
Merge branch 'hotfix/0.4.0.1'
Reports email notification; wrong recipient

The mailer uses the person_id to find a user
which cannot work on a production environment.

I haven't used a remote user on my test setup.

(cherry picked from commit 01a45ccf40790a8c8b0cc73ed360619047c14447)
Re-bump version to 0.4.0.1
Merge branch 'hotfix-0.4.0.1-post-report'
Merge remote-tracking branch 'upstream/master'

Bugfix