Return a promise from sync:closeAll

Note, this will throw a more traceable error if `ajaxSync` doesn't exist and no database is given