Always use the safe open() call

Authored by simonmar on Dec 11 2017, 11:56 AM.

Description

Always use the safe open() call

open() can sometimes take a long time, for example on NFS or FUSE
filesystems. We recently had a case where open() was taking multiple
seconds to return for a (presumably overloaded) FUSE filesystem, which
blocked GC and caused severe issues.

Test Plan: validate

Reviewers: niteria, bgamari, nh2, hvr, erikd

Reviewed By: bgamari

Subscribers: rwbarton, thomie, carter

GHC Trac Issues: Trac #13296

Differential Revision: https://phabricator.haskell.org/D4239