Rinse beans well and pick over them to remove any foreign particles. Place beans in mixing bowl, add cold water to cover to a depth of four inches above the beans. Let stand overnight. Heat oil in a soup kettle. Add the salt pork, cubbed ham, four cups shopped onions and garlic. Cook stirring, about 5 minutes until onions are translucent and salt pork rendered of its fat. Drain beans well and add them to the kettle. Add broth and bring to the boil. Add salt, black pepper, and cayenne pepper.. Partly cover and cook stirring ocassionally, about 4 hours. Put half the soup with the beans through a food mill or sieve or use a blender.. Return to the kettle and stir, to blend with the remaining soup and beans. Add vinegar and dry sherry. Serve pipping hot with chopped onion, lime slices, chopped ham and rice.