How can you stop dual pocket doors so they close in the center and do not come off the track
Usually there is a metal stop (like an angle bracket) inside the top track area that stops each door at the center. If you cut away the top corner of the door you could use wood, metal is thin enough that it's often not bothered with, or could be done (if looking for perfect closure) but is a much smaller cut. 

You could also block the track to stop the wheels at the proper position, but it's harder to get right.