Cleanup/reorg of conventions.encode_cf_variable

Related: #162
Properly handle string arrays with missing values

Fixes #120

Serialization to disk for dtype=object arrays filled with string
variables and missing values marked by np.NaN now works.

Note: there are still bunch of failing tests on Python 3 to resolve.
Fix failing string fillvalue tests for py3k
Cast encoding['dtype'] to np.dtype
Merge pull request #165 from xray/cleanup-conventions

WIP: cleanup conventions.encode_cf_variable