By 1640, the town's theocratic government and nine-square grid plan were in place, and the town was renamed Newhaven from Quinnipiac. What type of government did the Puritan settlers establish?