(PUP-4032) Fix exitcodes on puppet device
Puppet device does one catalog run per device in device.conf, however it
was then throwing away the return codes of the catalog compile and
apply. The man page says that puppet device supports
--detailed-exitcodes, so this fixes it.
Since there are multiple catalog runs in one command, exitcode masking
is unavoidable, so I selected to take the path of returning the single
most important exit code, in decending order with the exception of exit
1 taking precedence.