Adding global app disk quota, fixes #5179

Squashed commit of the following:

commit f99ee1316d88698ecbdea37c13f3db9cce06641e
Author: José Raddaoui Marín <raddaouimarin@gmail.com>
Date:   Mon Jul 8 20:35:16 2013 +0200

    Various fixes.

    Remove checkout duplication, use isUploadAllowed(),
    remove dir_size function.

commit f0cef31d46530d8e7b9c0bf46befb03cc5762e77
Author: José Raddaoui Marín <raddaouimarin@gmail.com>
Date:   Sat Jul 6 02:29:15 2013 +0200

    Move reachedAppUploadLimit to QubitDigitalObject

commit ba973ed76a7d6663dc1988e4121b84d0776c838d
Author: Jesús García Crespo <jesus@sevein.com>
Date:   Fri Jul 5 11:39:38 2013 -0700

    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

commit d3f6fd749538a799578fda1161143b56244f9e65
Author: José Raddaoui Marín <raddaouimarin@gmail.com>
Date:   Wed Jun 12 16:14:23 2013 +0200

    Forward to secure action instead of 404

commit bcf5df2f4978c2071546db00238529b1ae6f6a9a
Author: José Raddaoui Marín <raddaouimarin@gmail.com>
Date:   Sat Jun 8 23:38:41 2013 +0200

    Check if uploads are allowed in some actions

commit 8095357ecda0828b5ff6fe133353c1111507442a
Author: José Raddaoui Marín <raddaouimarin@gmail.com>
Date:   Sat Jun 8 15:45:20 2013 +0200

    Add row to show upload usage

commit 44ee79979502875814cc5cff3facf8e1d48dc7e0
Author: José Raddaoui Marín <raddaouimarin@gmail.com>
Date:   Sat Jun 8 15:44:37 2013 +0200

    Add dir_size function

commit 6dd23dec18669a995a3b115692b32b30b32a2177
Author: José Raddaoui Marín <raddaouimarin@gmail.com>
Date:   Sat Jun 8 15:43:41 2013 +0200

    Show warning if upload limit is reached

commit 2b936c80dcf41f46c929c34ba4a7cc1c8b96e747
Author: José Raddaoui Marín <raddaouimarin@gmail.com>
Date:   Sat Jun 8 15:42:23 2013 +0200

    Remove dig obj actions if upload limit is 0

commit 99387b190399bfb4689f5b62dcde3a03963da850
Author: José Raddaoui Marín <raddaouimarin@gmail.com>
Date:   Sat Jun 8 15:39:14 2013 +0200

    Add configuration variable for upload limit