Nationwide housing affordability improves in third quarter