Some cleanups, refs #5179

- Replaced atom_upload_limit with upload_limit in app.yml
- Move dir_size to Qubit.class.php, updated QubitRepository accordingly
- Change order of the quota checks