add randi + tweaked AliasTable

The sampling speed of AliasTable is doubled with this commit.