Use ready method on polymer components

Use ready lifecycle method instead of created, when created is called
attributes are not yet populated
Fix how to calculate ws URL from baseapi URL
Fix typo in log
Fix domain detection in domain check middleware
Fix domain detection in ws request
Replace deprecated calls to res.send(status)
Add example where component is imported from heroku