PyObject: fix gil deadlock on destruction

Change-Id: I5feb011a8b039f6aa7bf54187730e5261ace5eba
Reviewed-on: http://gerrit.aldebaran.lan/51608
Reviewed-by: pdaouadi <pdaouadi@aldebaran-robotics.com>
Tested-by: pdaouadi <pdaouadi@aldebaran-robotics.com>
module: add test

Change-Id: Ic5599a54bb81ae90d3d2283a84eb67c63173ee50
Reviewed-on: http://gerrit.aldebaran.lan/51531
Reviewed-by: pdaouadi <pdaouadi@aldebaran-robotics.com>
Tested-by: pdaouadi <pdaouadi@aldebaran-robotics.com>