This command can be accessed from an image menubar as
Layer->Autocrop Layer.
"Autocrop Layer" removes borders from the active layer. It searches the
active layer for the largest possible border area that all has the same
color, and then crops this area from the layer.