A periodic ab initio study of the structure and relative stability of silica polymorphs