libcutils: clean up the ashmem code a bit.

Less duplication, more modern idioms.

Change-Id: Ic6f36a35abf0c8b99f23ec9d59d76a4fd6b091ca
1 file changed