Prepare the ground for supporting multiple cameras by refactoring the foscam library.