Lock for controllers dict.

There are two threads running in RFMonitor, one for testing and other
for scheduling. Both the threads use controllers dictionary. So to
prevent the condition of simultaneous usage of the data structure by the
two threads, the data structure is locked when it is being used by one
of the threads and released as soon as changes are done.

Signed-off-by: Srijan Mishra <srijan23mishra@gmail.com>
Acked-by: Joe Stringer <joestringernz@gmail.com>