Formal variation and semantic change in the Middle English demonstratives