adapted resources to be proper OSGi services and produce nice JSON

Signed-off-by: Kai Kreuzer <kai@openhab.org>