Re-write

Complete re-write of the API code. Now works reliably noneccting to any
cgminer instance on subnet.

Refactored API calls from display code. Refined object handling in
display code.