add crystal support and refactor a lot of code.

Pipeline is now `Image -> Sprite IDs -> Text` instead of `Image ->
Text`, to allow better dialog text extraction and prevent misidentifying
sprites.