Generic spin model for the honeycomb iridates beyond the Kitaev limit