Experimental work for exposing CMaildirs to Lua.

Change some vector<CMaildir *> to vector<shared_ptr<CMaildir> > in
anticipation of Lua potentially having references.
Merge branch 'master' into expose_maildir
Fix other references to get_folders().

References to get_folders() now all store vectors of shared_ptrs.
Work in progress on Lua-side maildir filtering (untested but compiles).
Fix bugs in the maildir binding.

Fix sense of strcmp() and remember to assign the pointer into
the userdata.
This is enough to filter on name.
Expose maildir path as well.
Add unread/total_messages to CMaildir binding.
Replace 'CMessage *' with std::shared_ptr<CMessage>.

This is work towards exposing CMessage to Lua.
Merge branch 'master' of https://github.com/skx/lumail into expose_maildir
Send any Lua error from the Lua filter function to the on_error callback.
Merge branch 'master' of github.com:jugglerchris/lumail into expose_maildir
Merge branch 'master' into expose_maildir
Merge remote-tracking branch 'origin/master' into expose_maildir
Fix a warning (unused lua_tostring).
Export maildir::matches_filter() to Lua.
Merge branch 'master' of https://github.com/skx/lumail into expose_maildir

Conflicts:
	src/variables.cc
Expose matches_regexp instead of matches_filter.

This is just like matches_filter() but doesn't have the special
case handling of "new" or "all".
A bit of documentation improvement.
Add filter_maildirs example.
Merge pull request #211 from jugglerchris/expose_maildir

Expose CMaildir to Lua