Fully expose Mapserver errors in Javascript

All the key mapserver error properties along with any error stack are
now available in Javascript.