A Javascript utility to queue javascript methods