src/xi.c : Set basenote and loop info in instrument structure.

Previously this was only logged but not exposed. Now applications can
query the information.

Based on a patch from Stefan Sauer <ensonic@users.sf.net>.

Closes: https://github.com/erikd/libsndfile/pull/54
src/libsndfile.h: small code cleanups

Use more typedefs and add more comments to point from the ints to the enums.
Don't change the ints to enums for ABI reasons.