Formation of positronium at metal surfaces