[MRG] io.file improvements: context preservation

```python
    with MemFile() as a:                                                        
        assert_equal(ROOT.gDirectory.func(), a)                                 
        with MemFile() as b:                                                    
            d = Directory('test')                                               
            with d:                                                             
                assert_equal(ROOT.gDirectory.func(), d)                         
            assert_equal(ROOT.gDirectory.func(), b)                             
        assert_equal(ROOT.gDirectory.func(), a)                                 
                                                                                
    # out of order                                                         
    f1 = MemFile()                                                              
    f2 = MemFile()                                                              
    with f1:                                                                    
        assert_equal(ROOT.gDirectory.func(), f1)                                
    assert_equal(ROOT.gDirectory.func(), f2)                                    
    f1.Close()                                                                  
    f2.Close()
```