added reference count to ContextBuilder to keep track of how many external references to the M2k context are present. When the last reference is removed, the M2k context can be closed.
contexts should be closed in the reverse order they were opened: contextClose() -> iio_context_destroy() to avoid pointer errors.
based on context ownership, the user of the API is responsible of deinitalizing resources.