Remove duplicate const qualifier

Found when compiling with clang
Fix a memory leak in libftdi connection

Every time when the ftdi_context was closed using ftdi_deinit()
the memory of the ftdi_context itself was not freed.

Found by running urjtag under valgrind.
Do not check for NULL pointer before free()

Simplify
if (x)
  free (x);
to
free (x);

Most other parts of the code already omit such checks.
Free urj_part_t->id using the right function to avoid a memory leak

urj_part_t->id is allocated using urj_tap_register_duplicate()
so it should be freed by urj_tap_register_free().

Found by running urjtag under valgrind.