add license to toplevel README file

Signed-off-by: Michael Walle <michael.walle@kontron.com>
refactor API

Move static methods outside the class and into the module. Rename _handle
to handle. Provide a global open() function, rather than a class method.
Move all constants into a new module.

Signed-off-by: Michael Walle <michael.walle@kontron.com>