Rewrote GenericServlet.cast() to support objects nested in Arrays and
Lists.
code cleanup.