Add alternative java maxflow algorithm

Bulkier than the C++ one but should still be as efficient complexity
wise - another version of Dinic's algorithm