pgsql: Disentangle concurrent stash flushes explicitly. - Solves the last remaining one-deadlock-per-month problem. - Speeds up the critical path with regard to stash-flushing.