util/disk_cache: add a write helper
util/disk_cache: add a write helper

Simplifies the write code a bit and handles EINTR.

V2: (Timothy Arceri) Drop EINTR handling. To do it
    properly we would need a retry limit but it's
    probably best to just avoid trying to write if
    we hit EINTR and try again next time we see
    the program.

Signed-off-by: Grazvydas Ignotas <eac34e836c3bc120048c86fead6dd0257a872a9e@gmail.com>
Reviewed-by: Timothy Arceri <c48760dafc316d20cf5b0817150c999e82cd892f@itsqueeze.com>

metora/MesaGLSLCompiler,metora/MesaGLSLCompiler,metora/MesaGLSLCompiler