series.js: add findClosestElement; utils.js: add matrix routines (including inverse)