Add integration test for history command and fix bug where history
would occasionally be returned in the incorrect order if sequential
layers had the same created time.

Docker-DCO-1.1-Signed-off-by: Bryan Murphy <bmurphy1976@gmail.com> (github: bmurphy1976)
Merge pull request #5559 from bmurphy1976/bmurphy1976-history-bug

Test and fix history command ordering