Computational complexity of vacua and near-vacua in field and string theory