Nfactor fix

Sometimes the json parser, will read/apply nfactor before algorithm is set. When that is the case, set_algorithm() will reset nfactor to 10 preventing nscrypt from loading properly. Corrected the function to use previously set nfactor or default to 10.