Sensex, Nifty End Nearly Flat After Volatile Session