Merge changes from topic "ion-unit-tests"

* changes:
  libion: make tests work with Ion from common kernel.
  libion: Add missing error checks for input parameters to APIs.