Merge pull request #86 from webbedspace/master

Interface improvements + new image asset feature + other enhancements
Merge pull request #88 from webbedspace/master

More changes
Merge pull request #89 from webbedspace/master

Further additions
Merge pull request #91 from webbedspace/master

Close-to-final additions
Merge pull request #94 from webbedspace/master

Imminent 1.4.0 release
Merge branch 'master' of git://github.com/tweecode/twine into tweecode
Merge branch 'master' of git://github.com/tweecode/twine into tweecode
Merge branch 'master' of git://github.com/tweecode/twine into tweecode
Fixed positioning of new passages
Merge pull request #105 from greyelf/i012_position_new_passage

Fix positioning of New Passages
Merge pull request #106 from webbedspace/master

Post-1.4.1 fixes
Removed arguments from Tiddler.update()

The arguments includeInternal and includeMacros were supposed to allow
the caller to select which links should be included. In practice, none
of the callers pass any arguments, so the defaults are always used.

There was a bug in handling wiki-style links inside <<choice>> macros:
the "m" match object was used, which was set in an earlier loop,
instead of the "item" match object that contains the <<choice>> match.
This didn't lead to any visible problems because the regular link
finder would also find all wiki-style links inside macros.

Since it would require extra effort to ensure that when includeInternal
is False the update() method wouldn't pick up wiki-style links inside
macros, I decided it was better to instead drop the includeInternal and
includeMacros arguments.

I did an additional cleanup in parsing the old style <<choice>>
argument syntax: it would strip off text before the pipe character,
but that is relevant only in wiki syntax.
Support HTML import of SugarCube-based stories

SugarCube uses ID "store-area" instead of "storyArea" for the <div>
that contains all the passages.
Further simplification of Tiddler.update()

Don't bother to assign the expression iterated through to a variable
when it is only used by the following "for" statement.

Add to the "actions" list using extend() instead of list concatenation.
This avoids creation of a new list object.
Collect links in a set in Tiddler.update()

Previously, the links were collected in several lists, then combined,
converted to a set (to remove duplicates) and then converted back to
a list. That involved a lot of unnecessary work.
Also deduplicate image references in Tiddler.update()

The links were deduplicated, but the images were not. I don't see any
reason for this difference.
Use sets for storing *_PASSAGES and *_TAGS categories

Since the most common operation on these is a membership test and the
order doesn't matter, a set is a good choice for the data type.

Also use INFO_TAGS in isStoryText() instead of calling several methods
to check for specific tags.

In StoryFrame.buildIncludes(), when including files with the ".tws"
extension, passages with a title that is a *substring* of an excluded
passage name were skipped. I assume this was a bug and the correct
behavior is to skip only passages where the title is *equal* to an
excluded passage name, as was done for included Twee files (albeit
in a slightly overcomplex way).
Optimized the concatenation of story HTML fragments

The main thing is to avoid adding to a string repeatedly, since this
requires an increasing number of bytes to be copied again and again
as the string grows. Instead, put the fragments in a list and at the
end join that list.

Avoid repeated lookup of the tiddler in the dictionary.

Test whether obfuscation is enabled before testing the title: this
avoids the title check completely when not using obfuscation.

The latter two optimizations probably won't have a noticable impact
on performance; the first one probably will on stories with many
passages.
Removed "html" argument from addTweeFromFilename()

There is no reason to share code between addHtmlFromFilename() and
addTweeFromFilename() since both are essentially one-liners.
Removed unused method TiddlyWiki.tryGetting()