Quick optimizations in templates

Thanks django-debug-toolbar-template-timings
Correct bug fetching comments for non existing issue
Manage the 999 vars limit of sqlite