Sophist additional script functions

Add script functions $eq_any, $ne_all, $eq_all, $ne_any, $swapprefix and $delprefix.