Optimize power down and watchdog

The idea is to make the generated code inlined since most underlying operations are very simple and just mean a memory location is written and avoids the need for a function call and saving and loading of parameters.