Implemented async processor API for JavaScript.
Added chat example to test async processor API.
Minor gallery example improvements.