Fluctuational electrodynamics of hyperbolic metamaterials