Five-brane superpotentials and heterotic/F-theory duality