Moved some definitions around to fix build on different compilers.

- Fixed build with clang 5.1 and gcc 4.8.3 by moving around some
  definitions.
- Added virtual dtor to Data.
- Moved data_ptr ctor implementations to .cpp file.
- Added template specialization of data_ptr::operator= for data_list.
- Added template form of make_data() that uses boost::lexical_cast.

Signed-off-by: Chris Reed <flit@me.com>
Removing newlines after control stmt on a line by itself.

- If a control stmt is the only thing on a line, the newline following
  the stmt will be removed.
- Made if stmt explicitly check for != operator instead of assuming
  anything not == is !=.
- Made Tokenfor and TokenIf member variables private.

Signed-off-by: Chris Reed <flit@me.com>
Added def stmt and comments, plus other improvements.

- New data_map::key_error inner class.
- Added parse_path() method to data_map, which evaluates a dotted key
  path and returns a data_ptr reference. It can also optionally create
  the path.
- Changed TemplateException to be based on std::runtime_error to simplify
  and fix the what() method.
- Added TokenParent subclass of Token that adds children support that
  was duplicated in TokenIf and TokenFor.
- Added new def statement via a TokenDef class.
- Changed parse_val() to call data_map::parse_path() to evaluate the
  dotted key path.
- Made the TokenEnd ctor figure out the token type instead of doing it
  every time gettype() is called.
- Added support for comments in control statements started with '--'.

Signed-off-by: Chris Reed <flit@me.com>
Boolean data type.

- Added DataBool class. Its text value is "true" or "false", and its
  empty() method returns true if the bool is false.
- Support in data_ptr ctor for DataBool.
- data_ptr::operator= specialization for bool.
- make_data() overload for bool.
Line numbers in exception error messages.

- Added line number tracking to Token classes, extending all the ctors
  to take an optional line number argument.
- Reverted TemplateException to a subclass of std::exception.
- Modified TemplateException to take a line number used to automatically
  add a prefix to the reason string. It also has a new set_line_if_missing()
  method that is used to add a line number and reformat the reason string
  before rethrowing a caught TemplateException.
- Made the string parameter for strip_comment() a const reference.
- Added count_newlines() function.
- The TemplateException's line number is now set whever a Token class
  throws an exception.
- Added exception handlers for TemplateException in certain Token methods
  to add line number info to the exception and rethrow.
- tokenize() was enhanced to track the current line number as it works,
  and set the line number on all created Token instances.
Added rvalue reference support.

- Added rvalue ref ctors and operator= for the data classes and for the
  make_data() functions.
Additions to loop info dict.

- Added 'last' and 'count' values to the 'loop' dict created by the
  for statement every time through the loop.
Pseudo-functions and variable stmt whitespace trimming.

- Added empty() and count() pseudo-functions and general
  support for pseudo-functions to parse_val().
- Trimming whitespace from variable statements, so this works
  now: "{$ foobar }"
Placed internal implementation details in cpptempl::impl namespace.

Signed-off-by: Chris Reed <flit@me.com>
Added defined() pseudo-function.

Signed-off-by: Chris Reed <flit@me.com>
Major improvements to documentation in readme and top of header.

Signed-off-by: Chris Reed <flit@me.com>