iio: refactor info mask and ext_info attribute creation.