Implement init/exit context routines for proper allocation/deallocation of caches, implement free_viewstate(), now vsType has the ->length member, for, well, lengths. vsArray.length has been abolished.