Port all functions from ArrayFire 3.4

Each header "foo" file should have the following:

  • src/foo.cpp
  • R/foo.R

Also add tests if possible, though they are not necessary

  • test/simple_foo.R
  • algorithm
  • arith
  • array
  • blas
  • data
  • defines (library.py)
  • device
  • features
  • graphics
  • image
  • index
  • lapack
  • signal
  • statistics
  • util
  • version (merge with util)
  • vision

C++ only headers that are not being ported

  • exception.h (ported the necessary C function to util.py)
  • complex.h
  • dim4.hpp
  • gfor (are there any necessary bits??)
  • constants