Hamas says it will hand over the body of an Israeli soldier who was killed in 2014 and who has been held in Gaza since then.