Make window resizeable and define constraints on dimensions

This adds minimum dimensions for the expanded and opened states
and adds maximum dimensions to the closed state so that the window
cannot be resized when closed
Remove toggle size to expanded

Now that the window can be resized, there is no need for an explicit expanded state
use implict this
add isHiragana() method and optimize query

Special case kanji, hiragana, and katakana queries for micro-
optimization. This was also an attempt to use like queries, but
the database is too big and the query runs too slowly to be useful