Refactor the unit test for MemoryBuffer::getOpenFileSlice

Run in two different modes: with and without reopening the temporary file
between creating it and mapping it with MemoryBuffer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186986 91177308-0d34-0410-b5e6-96231b3b80d8
Expand the comment on getOpenFileSlice a bit for more details and consistency


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186987 91177308-0d34-0410-b5e6-96231b3b80d8