gta04 charging - implement charging logic to avoid charging bugs

GTA04 charging on some chargers is bugged. The problem is that by
default kernel sets charging current to 600mA and if the USB power
supply is not strong enough, then voltage drops under 4.5V. This
confuses GTA04 charging logic and the result is that GTA04 after
charged to full then discharges to 0 because charging never starts
again. See twl4030_charger.c and especially the function
twl4030_charger_enable_usb().

The solution QtMoko now uses is that we disable charging with 600mA
when QtMoko starts. That's the line:

qWriteFile("/sys/module/twl4030_charger/parameters/allow_usb", "N");

Now when USB is plugged it starts charging just with 100mA. We slowly
raise the current and check if voltage remains above 4.5V.

There is even some logic when battery is getting full we lower the
charging current (using values from battery) so that battery charges
very very slowly.

You can check charging in NeoControl - it has nice charging graph now.