Potential-energy functions for Cu, Ag and Au solids and their application to clusters of these elements