The locks were not being initialized, and since I was there did some
general cleanup as well, moved the locks array into displayLinks rather
than having another global namespaced variable.
Apple has deprecated CVDisplayLink in favor of CADisplayLink which has
different semantics. So turn off deprecation warnings for
CVDisplayLink related code only until I can be bothered to port it to
CADisplayLink.