VE-782: animation cleanup and minor refactoring

Now only uses JavaScript animations. Couldn't get reliable animations in
CSS, probably because of adding/removing from DOM. Also make
loadingIndicator method a bit more generic so it can be used with other
kinds of indicators in the future (like saving).