[BUGFIX] Page-Tree context menu uses prototype.js functionality

Replace Array.last() call with native JavaScript.

Resolves: #62994
Releases: master
Change-Id: I15a5c9021bde59511bb9ac3fc43cee26c7c36b3e
Reviewed-on: http://review.typo3.org/34214
Reviewed-by: Benjamin Mack <benni@typo3.org>
Tested-by: Benjamin Mack <benni@typo3.org>
Reviewed-by: Mathias Schreiber <mathias.schreiber@wmdb.de>
Tested-by: Mathias Schreiber <mathias.schreiber@wmdb.de>
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>
Tested-by: Oliver Hader <oliver.hader@typo3.org>