Quadratic Poisson algebras of two-dimensional classical superintegrable systems and quadratic associative algebras of quantum superintegrable systems