fsm - FetchAndDownloadInventory tests fixes

more tests for overloaded boolean
fix second test case, it was wrong actually
gemu-test - allow state file to remember already-completed tests
gemu-test - code for "download" testing + roll_partsize now used for both partsize and segment-size
gemu-test download testing + various fixes

1) download testing with output verification
2) state file now treated as UTF-8
3) sample files now generated with random