Changes HtmlGrid.getAreas to return the area names in declaration order.
Adds HtmlWriter.writeGridJavaScript method to reorder the areas when necessary.