Sort instances by status then name directly in template

This PR completes work on #439 adding the default sort (by status then name) in the ```instances.html``` template. In some cases (Firefox on slow machine with lot of instances), before this, table is sorted after hundreds of milliseconds.; with this fix instances are already sorted in the right order.