A fast algorithm for Direct Numerical Simulation of natural convection flows in arbitrarily-shaped periodic domains