Phase change memory and switch