Intelligent video surveillance as a service