core: Add initial EnergyManagement service implementation

EnergyManagement is a way to tell controlpoints that the device
(e.g. Mediaserver or Renderer) may suspend, and also advice on
how it can be woken up:
http://upnp.org/specs/lp/UPnP-lp-EnergyManagement-v1-Service.pdf
core: Fix build with master
core: Move non-portable functions to C

This way, we can #ifdef properly for different OSs other than Linux.

Signed-off-by: Jens Georg <mail@jensge.org>