environment variable for no reboot at the end

The device.py is changed in order to not do a reboot if it is not
necessary. To configure the reboot at the end of a devicetestcase you
use the environment variable "MONK_NEED_END_REBOOT". Value 1 means
reboot necessary and 0 means reboot not necessary. In default the device
is rebooting at start of the test.