Add basic webserver API (#2025)
* Add to settings.html
* Add setting
* Base implementation
* Add yomitan api to permissions check
* Disable version checking
* Separate startApiServer and add proper logging
* Remove unused
* Start server if remote version is requested but not started
* Start api server on extension startup
* Pass apiMap to yomitanApi to call for data
* Remove sequence and data
* Pull params from piped post body
* Less risky formatting
* Send json through without stringify
* Simplify user facing api params
* Add kanjiEntries api path
* Log error in yomitan on bad api request
* Remove profileindex requirement
* Add initial `ankiFields` api path support
* Add linkedom dependency
* Require passing document into AnkiTemplateRenderer
* Get TEXT_NODE and ELEMENT_NODE from document
* Use linkedom domless document for backend API side AnkiTemplateRenderer
* Allow multiple markers and rename handlebars to markers
* Support kanji type in ankiFields api path
* Allow document to be undefined in template renderer test
* Set up commonData for every dictionary entry
* Send data for all entries
* Allow setting the max number of entries
* Fix copyright year
* Update legal-npm for linkedom inclusion
* Add general.yomitanApiServer option and fix general.enableYomitanApi assignment
* Pass through url for testing yomitan api
* Fix extension on yomitan-api.d.ts
* Make test actually test the api server
* Change remoteVersion to serverVersion
* Dont parse body if no length
* Add yomitanVersion api path
* Remove unnecessary array
* Fix link
* Remove unused
* Remove isActive usage