cache information about already ran scripts to speed up script status checks

* also update NHibernate queries to use QueryOver which gives more compile-time safety