libbladeRF: Correct equation for samplerate.

Corrected a samplerate equation calculation which helps determine how
many transfers should be outstanding over any timeout period at a
specific samplerate.  The samplerate should always be greater than the
calculated number, not less than.
fx3_firmware: Clear DMA buffers when disabling an RX or TX module

Stale RX and TX samples have been reported (issue #255). This occurs
because the CyU3PResetEp() call does not reset DMA channels and their
underlying DMA buffers, nor does it clear the DMA buffers associated
with an endpoint.

Use of the existing ClearDMAChannel() as is would have required some
ridiculous shoehorning, so some cleanup was done:

    - Endpoint halt & ACK operations have been removed from
      ClearDMAChannel(). These operations are outside of the scope
      of clearing DMA buffers, and have been moved to their respective
      locations in handling set/clear halt endpoint requests.

    - reset_endpoint() has been added to the NuandApplication function
      table. Internally, this operation is now used in performing
      the halt_endpoint() operation.

    - Misc return value checks added. Granted, these don't help much
      as there's no accessible debug log.
fx3_firmware: Added support for reading back FW loopback state
fx3_firmware: Bumped patch revision (v1.7.1)
libbladeRF: Added FW version v1.7.1 to compatibility matrix
libbladeRF: Added readback of FW loopback, disable it for LMS loopback

Added the ability to read back the state of FW loopback from devices
running FW v1.7.1. While it is possible to enable FW loopback mode in
v1.7.0 firmware, libbladeRF will now enforce the v1.7.1 requirement so
it can correctly read back and report the FW mode.

bladerf_set_loopback() has also been updated to ensure that the
FW loopback is disabled when switching to an LMS loopback mode.
libbladeRF: Added temporary workaround for FX3 "Already started" error

This error from the FX3 is likely harmless, and I'll investigate further
soon. It only appears to occur when the firmware loopback mode times
out, and does not hinder further use of the device.

Given the lack of apparent severity, this band-aid is intended to keep
libbladeRF from overreacting until some time can be spend fixing the
underlying issue.
bladeRF-cli: Added support for enabling/disabling FW loopback
bladeRF-cli: Added note about viewing available loopback modes
libbladeRF: Fixed LPF mode readback

This became inconsistent when the LPF disabled mode was updated
to both disable bypass and power down the LPF in a5402b78.
libbladeRF: Added simple set & readback tests for control functions

This program performs some simple operations with the various libbladeRF
"control" functions. It is mainly intended to only check for the
presence of grossly erroneous code in these functions, that would cause
crashes or bizarre results.
libbladeRF: Account for FPGA offset of gain correction value
libbladeRF: Removed old error tracking code and structures
libbladeRF: Moved "get sampling" implementation to lms.c
libbladeRF: [WIP] Added control lock acquisition to top-level

Top-level API functions now acquire a per-device lock before performing
"control" operations.

Only these top-level functions shall acquire these locks; the core code
should be able to assume that locks are already acquired.

To alleviate confusion, functions that are *not* part of the API, and
therefore are safe to call within the core logic,  are stripped of the
bladerf_ prefix.

This code will currently induce deadlock. The following commit will
clean up calls to API functions from within the core code.
libbladeRF: [WIP] Don't call API functions from lms.c
libbladeRF: [WIP] Don't call top-level API functions from si5338.c
libbladeRF: [WIP] Moved FPGA functions, don't use bladerf_* fpga fns in core
libbladeRF: [WIP] Removed API calls from xb.c
common: Fixed typos in mutex macros for check locks