moved class_prior in NB to __init__

This pull request is trying to fix issue #1486.

Please let me know if this is the way you expected it to be.