Add a badge to show count number.

Extract all the same template code into a new roles.html.

In the roles.html it will show how many people in each roles.

Fixes: #1975
Change-Id: Ia9013e527d26c904e9227af3b3bd620b68fd664f
Optimize SQL queries.

Reduce sql queries of project page from 1.3k to 4.

Reduce sql queries of user page from about 100 to 4.

Fixes: #1960
Change-Id: I94b564781b96a72c3fb04ad6f330570adca781f0
Auto focus user name input in login page.

When user click and redirect to login page, this user name input
should be auto focus to let user input text directly without
click mouse again.

Change-Id: I04405619ffc59225a8531474ed6f6893ad152022
Fixes: #1973
Remove useless template tags.

Template tags defined in this file are useless. And it imports
a non-exists module which will raise ImportError.

    from iris.core.permissions import (can_edit, can_create_products,
  ImportError: No module named permissions

Change-Id: I5b4e2b1fac17701b4b066d7a81df57df1b09f34a