Revamp OrderBy.random() for postgres compatibility.