Update stacktable.js

Added support for headIndex, in order to choose what cell use as header. Also, I've done some variable name changes (the two "index" became "rowIndex" and "cellIndex", in order to avoid ambiguities).