Solstices brought Mayan communities together using monuments shaped by science and religion – and kingly ambitions too