First code upload

This first version has been mostly tested with Foreman 1.1, just
verified communication with Foreman 1.3
Fixed old imports in the doc and updated defs