Optimizing criteria expansion/collapsing

For issue https://github.com/MarkUsProject/Markus/issues/916.

Instead of doing AJAX calls, do do client-side JavaScript to expand/collapse the criteria.
Put one space between the method name and the first argument.