Refactor piwikApi angularjs object to allow aborting individual requests and all requests.

Includes new tests for all piwikApi functionality as well.