Fix off-by-ones

Harmless as long as modems terminate lines with CR+LF, the bug would show
if lines were terminated by CR or by LF alone.
Fix buffer read overflow

Uncovered by previous off-by-ones fixe. Since str is post-incremented
in the while loop, the following if statement will access memory after
the end of the buffer if the exit condition was *str== 0 or max==0
Fixes:
1 errors in context 1 of 2:
Conditional jump or move depends on uninitialised value(s)
   at 0x809A967: findcrlf (atgen.c:3460)
   by 0x809AAB9: splitlines (atgen.c:3426)
   by 0x809C4F3: ReplyGetCharset (atgen.c:2549)
   by 0x8062B53: sm_incoming_function (gsm-statemachine.c:115)
   by 0x80B97AB: atbus_loop (atbus.c:222)
   by 0x8062300: gn_sm_loop (gsm-statemachine.c:68)
   by 0x80627B9: __sm_block_timeout (gsm-statemachine.c:236)
   by 0x809B35B: AT_GetCharset (atgen.c:846)
   by 0x80A1794: Initialise (atgen.c:665)
   by 0x806154C: register_driver (gsm-api.c:92)
   by 0x8061762: gn_gsm_initialise (gsm-api.c:142)
   by 0x8061136: gn_lib_phone_open (libfunctions.c:175)
 Uninitialised value was created by a heap allocation
   at 0x4025BD3: malloc (vg_replace_malloc.c:236)
   by 0x4025C5D: realloc (vg_replace_malloc.c:525)
   by 0x80B971B: atbus_loop (atbus.c:144)
   by 0x8062300: gn_sm_loop (gsm-statemachine.c:68)
   by 0x80627B9: __sm_block_timeout (gsm-statemachine.c:236)
   by 0x809B35B: AT_GetCharset (atgen.c:846)
   by 0x80A1794: Initialise (atgen.c:665)
   by 0x806154C: register_driver (gsm-api.c:92)
   by 0x8061762: gn_gsm_initialise (gsm-api.c:142)
   by 0x8061136: gn_lib_phone_open (libfunctions.c:175)
   by 0x804D0C1: parse_options (gnokii.c:394)
   by 0x804D18E: main (gnokii.c:1234)
dku2libusb: always return error if there is no string
dku2libusb: handle usb_open() failure

Failure to do so might cause a segfault with some libusb and/or
libusb-compat versions.
See:
http://lists.gnu.org/archive/html/gnokii-users/2012-04/msg00004.html
Detach any linux kernel module bound to the USB device to be used by dku2libusb

This way there is no need to blacklist modules in /etc/modprobe.d/ however
libusb-0 provides no way to reattach the detached module (libusb-1 does have
it), so to have it back you can either rmmod cdc_phonet && modprobe cdc_phonet
or unplug the phone and replug it.
Fix typo
Make gn_sm_loop() just exit if there is no loop function

This makes it possible to use the fake driver with gnome-phone-manager.
No need to cast the return value from malloc() since it's a void *
Fix usage of uninitialized variable found with Valgrind

Fixes:
==16656== Conditional jump or move depends on uninitialised value(s)
==16656==    at 0x449132E: SCardListReaders (in /usr/lib/i386-linux-gnu/libpcsclite.so.1.0.0)
==16656==    by 0x40B2040: functions (pcsc.c:1464)
==16656==    by 0x380163EF: ??? (mc_malloc_wrappers.c:318)
Fix compilation warning

Fixes:
common/phones/pcsc.c:1509:14: warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default]
common/phones/pcsc.c:1512:14: warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default]
Added possibility to specify non default gnokii config file (alonso acuña).
Add another id for Nokia 1110 and ids for Nokia 1112 and Nokia 1208

Thanks to Gustavo Conrad for providing their ids.
Nokia 1110
01 00 00 08 00 01 58 2c 00 27 56 20 34 2e 30 32 |       X, 'V 4.02
0a 31 32 2d 30 35 2d 30 35 0a 52 48 2d 36 39 0a |  12-05-05 RH-69
28 63 29 20 4e 4d 50 0a 4e 31 31 31 30 0a 55 42 | (c) NMP N1110 UB
00 00                                           |
Nokia 1112
01 00 00 08 00 01 58 28 00 21 56 20 35 2e 30 33 |       X( !V 5.03
0a 30 34 2d 32 31 2d 30 36 0a 52 48 2d 39 32 0a |  04-21-06 RH-92
28 63 29 20 4e 4d 50 0a 55 42 00 00 00 00       | (c) NMP UB
Nokia 1208
01 00 00 08 00 01 58 28 00 22 56 20 35 2e 33 32 |       X( "V 5.32
0a 30 35 2d 31 38 2d 30 38 0a 52 48 2d 31 30 36 |  05-18-08 RH-106
0a 28 63 29 20 4e 4d 50 0a 55 42 00 00 00       |  (c) NMP UB
Make debugging messages more consistent.

Make debugging messages mode consistent when printing info about resizing
incoming buffer for the phonet connection.