Generalized Genetic class: works on bitset, takes other class' member as fitness function, and other refactorings.