web: Resize terminal DIV to contents

This is a simple fix to resize terminal DIV to the contents. It
helps mouse coordinate detection in term.js work correctly. We
probably should resize the black area behind, but this isn't done
here yet.