batched ota restore

Still in progress

@czue 

Initial testing is positive. For my test user with 11000 cases the memory comparison is:
* old: 2165808 kb
* new: 1553736 kb
E302 expected 2 blank lines, found 1