Patch it Up: Proactive Patch Management for Secure IoT Devices