What is the proper way to leave unused nonmetallic sheathed cable inside walls or ceilings?
There's nothing in National Electrical Code about removing abandoned electrical cable.  If it's communication, television, radio,  etc. cable, you have to remove the accessible portion of the cables.  If it's wire in a raceway (conduit, cables trays, etc.), you do have to remove it.  

Connecting the ungrounded (hot), grounded (neutral), and grounding conductors together is a common practice (one which I've recommended before). However, it relies on the breaker functioning properly, in the event the line is ever energized in the future.  The safer practice is to cap each wire separately, and label the wires as abandoned at both ends.