Dimerization of Carboxylic Acids: Reliability of Theoretical Calculations and the Effect of Solvent