index: make GIT_IDXENTRY a real enum

The documentation has shown this as a single enum for a long time. We
should simply make it a real enum.
index: add accessors for the flags

We already have a function to check the stage, let's expose the valid
and extended flags as well.