Abstract-out canvas creation into an object.
Abstract-out canvas creation into an object.

Moved canvas creation and size management into a new Canvas class.

This is the first step towards a more object-oriented architecture.
Since we create multiple canvases, and have to maintain several
module-global variables to track their properties, they are the ideal
place to start.

This commit also removes sizing code that was duplicated between
makeCanvas and resizeCanvas.

chiu/flot,klarkc/flot,k-joseph/flot,colinhunt/flot,pepperdata/flot,stanislavdavid/flot,andig/flot,flot/flot,soenter/flot,trask/flot,fashionsun/flot,resnick1223/flot,cipix2000/flot,sedran/flot,chaveiro/flot,ni-kismet/engineering-flot,resnick1223/flot,mlitwiniuk/flot,stanislavdavid/flot,k-joseph/flot,saike/flot,TrainingPeaks/flot,mlitwiniuk/flot,magora-suchkov/flot,lolifans/flot,Sensirion/flot,cipix2000/engineering-flot,chiu/flot,andig/flot,cipix2000/flot,chiu/flot,chaveiro/flot,saike/flot,resnick1223/flot,stanislavdavid/flot,mlitwiniuk/flot,petrvacha/flot,chaveiro/flot,kongx73/flot,soenter/flot,MAMISHO/flot,andig/flot,matong/flot,octavianCraciun/engineering-flot,mcanthony/flot,k-joseph/flot,gdseller/flot,saike/flot