SPAD-Based Quantum Random Number Generator with an Nth-Order Rank Algorithm on FPGA