By making these comparisons, the author is bringing out the theme of class conflict. She is showing A) how hard Oliver has had to work to get himself up from poverty and B) how much he resents those who are his social "betters."
When Oliver refers to the pearls as tears and the rubies as blood, he is alluding to how hard he had to work to become rich. He is saying that he put his blood and tears into getting those things. Woolf is commenting here on how excessive Oliver's desire for wealth is,
When Oliver refers to the diamonds as gunpowder, he is expressing his hatred. We can see from his relationship with the duchess that he harbors animosity and jealousy towards the aristocracy. He sees his diamonds as a way to destroy them, as a weapon.
By making these comparisons, then, Woolf is showing the strength of class-based anger in Oliver Bacon.