Reset email form value on success

closes #3663
- Set value of email input as nil string
Switch middleware order to result in proper error

fixes #3694

- Split the res.isAdmin check out into it's own thing because we need to detect whether we are in the admin, before everything else
Sends test email to the person who clicked on the button

Closes #3649

* Small refactor of the api route for email test. We no longer need to look up the email in the settings
* Added a user model lookup based on context to the test email method.
Close invite user modal immediately after submit.

Closes #3672, Closes #3673, Closes #3680
- Close and reset modal immediately after submit instead
  of waiting until after processing has finished.
Merge pull request #3702 from ErisDS/issue-3694

Switch middleware order to result in proper error
Merge pull request #3705 from wjake/issue-3663

Reset forgotten form on success
Merge pull request #3704 from javorszky/iss3649

Sends test email to the person who clicked on the button
Merge pull request #3706 from jaswilli/invite-fixup

Close invite user modal immediately after submit.