[cmyth] Fix checking for valid connection in connection.c

This fixes a couple of 'Dereference before null check' issues in
connection.c.
[cmyth] Return consistent errors in connection.c
[cmyth] Return consistent errors in storagegroup.c

- Return consistent ERROR values
- Use NULL instead 0 for null pointers
[cmyth] Use cmyth_mysql_query for DML statement

Use cmyth_mysql_query instead cmyth_mysql_query_result to avoid error messages.
[cmyth] Add cmyth_mysql_keep_livetv_recording

The function disables/enables auto expiration and sets the storage group to
'Default'/'LiveTV' to keep/release a recording.
[cmyth] Add cmyth_proginfo_storagegroup

Returns the storage group for a recording.
[cmyth] Add cmyth_proginfo_generate_pixmap

Use QUERY_GENPIXMAP2 to generate missing pixmaps. (protocol version >=61)
[cmyth] Change log level in cmyth_proginfo_get_from_timeslot

Change log level for error message "...didn't recieve OK as response"
from ERROR to NOTICE since it is not an error, just indicates that a
recording couldn't be found.
[cmyth] Cosmetics in event.c
[cmyth] Cosmetics in socket.c
[cmyth] Refactor cmyth_rcv_data

This function receives raw data from the socket and thus can be used to
get all data being leftover in the socket.

Note that this private function was not used anymore, but will be used
later for the above purpose.
[cmyth] Use cmyth_rcv_data in cmyth_rcv_okay

Improve receiving leftover data in cmyth_rcv_okay by using
cmyth_rcv_data instead of cmyth_rcv_string.
[cmyth] Clean leftover data in cmyth_event_get_message

Some events received in cmyth_event_get_message were able to break the
event connection completely by leaving back leftover data on the socket.
(Example: GENERATED_PIXMAP)

This is fixed by using cmyth_rcv_data at the function end.
In addition, events that are not interested in further data, can now
simply ignore it and don't have to read everything.