Create prim.cpp

Implementation of prim's algorithm using min binary heaps.