Added module bipartiteness

Algorithm for determining whether graph is bipartite or not. Also for
biregularness and
balanced bipartiteness.
Fixed is_bipartite bug, added some tests.
Added module 'base' and tests for it.

Find the base nodes of graph.