Rewrite urlstr.js: part 2

Rewrite two block-level functions.
These two functions return list- and selected emoticons in options, and content script.

Introduced two bugs. See issues for details.