Refactor Highchart and Highstock classes

* refactor highstock's render method
* extract common methods to the abstract base class