Add missing NcFile::enddef() method, so can create files of all format types
automatic data/define mode switching for classic files (see example in cxx4/test_classic.cpp)
assuring no exception is thrown from ncFile dtor
addVar for scalar variables
NcFile ctor: handling format + open
Merge pull request #10 from slayoo/master

auto data/define swith; no except. in dtor; addVar for scalars; open+format in ncFile ctor