Elastic and thermal properties of fluoride and oxide analogues in the rocksalt, fluorite, rutile and perovskite structures