Python-bindings: Refactor the Context class

The context class is now called TraceCollection and provides generator
functions to iterate over the traces' events. This makes it possible to
get rid of the Iterator, IterPos and File classes.

The examples are adapted to match the changes.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Python-bindings: Refactor the TraceHandle class to use properties

TraceHandle now exposes properties instead of getters. It also keeps
a reference to its parent TraceCollection.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Python-bindings: Refactor the Event class

The Event class now implements the collections.Mapping interface and
provides properties where appropriate.

The Definition class is now private and renamed to _Definition.

The examples are modified to take these changes into account.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Python-bindings: Move the _scopes array out of the Event class

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Python-bindings: Refactor the FieldDecl and EventDecl classes

Renamed the FieldDecl and EventDecl classes to FieldDeclaration and
EventDeclaration. Getters are now exposed as properties.

Fixed an out of bounds array access.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Python-bindings: Move declaration bindings out of the _Definition class

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Fix: Use the bt_iter_set_pos function to set the begin_pos

The current implementation of bt_iter_init asserts on begin_pos
that are not BT_SEEK_BEGIN. This uses the iterator set_pos function
to achieve the intended behavior.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Fix: Take the iterator's end position into account

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>