Thermodynamics and magnetism in the two-dimensional to three-dimensional crossover of the Hubbard model