Fix sticking spinners on ajax

This keeps track of how many times a spinner has been requested, and clears the spinner when countdown has reached zero.

Example, you are in an autocomplete field with validation on a slow network connection. You type a letter and autocomplete spinner is shown - then tab and validation spinner is asked for. With this fix, spinner will only be cleared when all ajax calls have completed.

Calc element is changed to use standard function rather than own spinner.