gstmemory: fix build with xcode 5.0

Fix warning: implicit conversion from enumeration type 'GstMapFlags' to different
enumeration type 'GstLockFlags'
tests: fix build with xcode 5.0
tools: fix warnings with xcode 5.0