windows: change definitions of regions into windows

- Windows may be nested.
- Pads can contain more that viewable size of window.
lib: pad implementation and error checking

- Implement pad scrolling and creation.
- Rework jx_screen() function to return top-level window.
- New error codes and checking functions.
- Interface changes to return error codes.