All the civilians who had been held by the Tamil Tigers inside Sri Lanka's war zone have been freed, the military has said.