Near-optimal algorithms for private estimation and sequential testing of collision probability