On the Hadamard form of hierarchical spline Galerkin matrices and their efficient assembly in isogeometric analysis