Quantum phase transitions in antiferromagnets and superfluids