Properties of heavy quarkonia and $B_c$ mesons in the relativistic quark model