Add more debug output
Make it harder to abuse IBufferAdapter

So the state index, command index members were all one greater than
the index of the corresponding float in the buffer. Why - because
the XML indices start at 1 instead of 0. This be confusing so
let's reduce the value of all the indexes by 1 so that they
properly correspond to buffer indexes.

This incidentally fixes an off-by-one / uninitialized memory bug
in CArmAdapter, since it was already expecting this behavior. So
that was why one of the numbers wasn't -nan!