Three-Dimensional Lattice Boltzmann Flux Solver and Its Applications to Incompressible Isothermal and Thermal Flows