js:knapsack object, returns optimal solution in total value, total weight, items selected, and a binary selection process