• webgl: Fix handling of UNPACK_ALIGNMENT.

    We were setting it to whatever value from {1,2,4,8} the user requested
    and otherwise ignoring it.  There were two problems there:
    
    1) Validation ignored it, so GL could read outside of the user's array
       in TexImage() or TexSubImage() if the aligment was greater than
       cpp.
    
    2) TexImage()/TexSubImage() from image/canvas sources wasn't packing
       its data according to the unpack alignment.
    
    To fix this, start tracking the user-requested alignment in the DOM
    side of the context.  Set the GL's alignment to 1 for image/canvas
    sources or the user's value for array sources, and pass the user's
    alignment in to validation so that it can figure out the correct size
    of image that the GL will ready.
    anholt committed Jan 29, 2017