Check for denied access in itemdef/nodedef/media fetch loop
tune and clean connections

Squashed commit of the following:

commit b5fff347151966ecb471ff837e3f9ed56eb0b317
Author: proller <proller@github.com>
Date:   Fri Dec 20 01:07:12 2013 +0400

    tune

commit c6b13e71bb925409091004d2abea1628fc80d8ef
Author: proller <proller@github.com>
Date:   Fri Dec 20 00:23:17 2013 +0400

    still tuning

commit 4ed7aaa0abe6b6b5c4d4d0adf2276b4863c0900e
Author: proller <proller@github.com>
Date:   Fri Dec 20 00:10:25 2013 +0400

    Tuning for slow mobile conections

commit 9e7bfcc3c8269552cb0b4cbe3aeab596dcb9a18c
Author: proller <proller@github.com>
Date:   Thu Dec 19 23:31:58 2013 +0400

    Connecction tune
Merge remote-tracking branch 'minetest/master'