Add host, port, and db to get_cursor().

Add host, port, and db as optional parameters with defaults to
get_cursor().