Nifty closes marginally positive at 23,649.95 amid volatile trading