Sort workflow history on update/serial, fixes #145, see also #112

Sort on update and serial to circumvent jumping serials on
oracle cluster, siwtch to use database for sorting (not perl)