Add Component.width() and Component.height().

Close #880.