Add perl bindings

Extend build files to also produce perl-bindings via swig.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Add examples

Add two examples to show how to use xwiimote from perl and python.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
bindings: check input paramters and throw ValueError

Avoid the segfault by checking input parameters in bindings.

Signed-off-by: Nicolas Adenis-Lamarre <nicolas.adenis.lamarre@gmail.com>
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
bindings: xwii_throw_exception must be followed by a return

in iface constructor, the return missing causes to fill the bad errno
because the call to watch was done with a NULL input.

Signed-off-by: Nicolas Adenis-Lamarre <nicolas.adenis.lamarre@gmail.com>