Change main loop to better match original algo

The algorithm given is something like:

    while looping
        for i in 1..m
            if violates conditions
                select j
                update(i, j)

But we were using

    while looping
        for i in 1..m
            if violates conditions
                select i
                break
        select j
        update(i, j)

Mileage may vary.
Switch bound computation for value (in)/equality

The original algorithm specifies that the bound computation should be
the opposite of what was previously there.
Fix typo in offset computation
Switch initial conditions from int to float
Return primal weights instead of dual alphas
Update test case to check correctness