Improve handling of host buffers

xgpuInit() now calls xgpuSetHostInputBuffer() and
xgpuSetHostOutputBuffer() to register/allocate host buffers, thereby
eliminating some code duplication.

The length passed to cudaHostRegister in xgpuSetHostInputBuffer() and
xgpuSetHostOutputBuffer() is now rounded up to the next multiple of
PAGE_SIZE, which is determiend at runtime via a call to sysconf().
Handle externally allocated host buffers better
Limit verbosity unless VERBOSE is defined
Fix names of guard macros
Add triLength field to XGPUInfo

The triLength field provides the length of the output data after
reordering it to "triangular order".
Merge branch 'master'

Conflicts:
	src/cuda_xengine.cu
	src/xgpu_info.h
First attempt at supporting BLOCK_COMPLEX

BLOCK_COMPLEX treats the complex input vector as containing real
components in the first half and imaginary components in the latter
half.

This commit is only for the case where SHARED_ATOMIC_SIZE=4.
Support complex blocking factor 8

Instead of fully block complex, assume the input data have a complex
blocking factor of 8 rather than 1.  A complex blocking factor N means
that N complex values are stored as N consecutive real values followed
by the corresponding N consecutive imaginary values.
Support complex block size of 8 in CPU correlator
Start changing to CBS=32

Compiles and runs.  Benchmark runs ever so slightly slower than CBS=1.
Add complex block size to xgpuInfo
Make internal context's streams field an array

The internal context's streams field had been a pointer that was
initialized in xgpuInit by a call to malloc to allocate memory for two
CUDA stream structures.  This changes the streams field to be a
preallocated array of 2 and removes the malloc.  Interestingly, the
memory allocated by that malloc call was never freed, so this fixes a
memory leak as well!
Support multiple CUDA devices

This change allows xGPU to be used with multiple CUDA devices.  The call
to xgpuInit now requires a device number.  The device number is stored
in the internal context.  Every call that interacts with the CUDA
device, now calls setCudaDevice with the device number from the internal
context.  This supports multiple processes each with their own CUDA
device as well as a single process with multiple CUDA devices.  Note
that no thread safety is performed in xGPU.  If the client process has
multiple threads interacting with the xGPU library, then it is the
client's responsiblity to ensure that multiple threads do not overlap
calls to xGPU functions.
Use getopt to parse cuda_correlator command line
Add "-d DEVNUM" option to cuda_correlator
Make bench script quieter

It now only outputs the results.  The compilation messages go to
/dev/null.
Add compile-time option to time some CUDA calls

This is basically for benchmarking some CUDA calls.  Define the macro
TIME_CUDA_CALLS to enable this functionality, for example:

  make CFLAGS=-DTIME_CUDA_CALLS

Recommended only for testing/debug.  NOT recommended for production.
Add input/output buffer offsets to xgpuCudaXengine

Previously, xgpuCudaXengine assumed that the start of the input buffer
was the start of the input data to be correlated and that the
input buffer was exaclty one input vector long.  Likewise, it assumed
that the start of the output buffer was where the output matrix was to
be copied and the the output buffer was exactly one output matrix long.
Users wanting to use multiple externally allocated input/output buffers
would call xgpuSetHostInputBuffer before each call to xgpuCudaXengine.
The problem with this approach is that xgpuSetHostInputBuffer calls
cudaRegisterHost and cudaUnregisterHost, which turn out to take a
surprisingly long time.  For details, see the NVIDIA Forum post entitled
"Poor performance cudaHostUnregister":

http://forums.nvidia.com/index.php?showtopic=210296

To circumvent this problem, the XGPUContext structure has been given two
new fields: array_len and matrix_len (both of type size_t).  These new
fields must be used when registering host allocated buffers to indicate
the length of the region being registered.  When using CUDA allocated
host buffers, these two new fields are set to the length of one input
vector and one output matrix, respectively.

Additionally, xgpuCudaXengine now takes an input and output offset so
that the user can do a one-time registration of one large input buffer
and one large output buffer one, each of which contain multiple input
and output buffers.  Then the user can simply pass the offsets of the
small buffers within the large buffers to xgpuCudaXengine.
Fix RPATH for install directory structure

This helps to ensure that the installed xgpuinfo command will use the
xGPU library with which it was originally linked.
Move input/output offsets into context

Commit 88b335b added input/output buffer offset parameters to
xgpuCudaXengine.  This commit moves those offsets into the context,
which makes the API backwards compatible for internally allocated host
buffers with only minor changes needed for code written to the API of
commit 88b335b.