Add Prim's algorithm implementation

-DDEBUG introduces a "use of uninitialized value, created by stack
allocation in prim_mst:871:". Where's this this coming from?

Signed-off-by: Andrew Tselischev <andrewtselischev@gmail.com>