Micro-intelligence for the IoT: SE Challenges and Practice in LPaaS