Implement critical section in nodelet

Volatile bool is not sufficient to prevent poll() and reconfigure() from
executing concurrently. This causes the nodelet to crash when poll()
releases the image on a closed camera.

Here a mutex is introduced to guard the relevant critical sections.