Issue 997: Added csrf token to AJAX POST requests

Certain POST requests were not being passed a CSRF token when CSRF
protection was implemented site-wide. This caused certain actions,
such as saving new projects, to error.