[Power] Implemented power-up/down functionality

Implement all the required functionalities to shut-down the tvheadend server when it is idle and restart the tvheadend server before an upcoming recording.