porting visibility writes back to accumulo 1.4

Ditto above, break into methods for readability.