Separate code in order to cover different situations in the future

Pick notes: Had to adjust the code since ours was a bit different due to
    goals requirements.

Conflicts:
	pootle/core/decorators.py
Also detect virtual files/dirs
Safety measures
Added missing semicolon
Add styles for muted checks; minor check-related CSS color tweak

Pick notes: Minor adjustments because of template indentation and sprite
    rebuilding.

Conflicts:
	pootle/static/css/sprite.css
	pootle/static/images/sprite.png
	pootle/templates/editor/units/xhr_checks.html
Use `get_children()` method instead

Pick notes: Just resolved minor conflicts due to code divergence.

Conflicts:
	pootle/apps/pootle_language/views.py
	pootle/apps/pootle_project/views.py
Corrected error message
Support getting codes according to the current item

This will be useful for virtual resources where the code doesn't
necessarily have to be the current item's code, but some other value
calculated according to the current item.