Creating a Grid class to manage 2D arrays

Replacing several occurrences of 2D C-style arrays with a Grid class,
which manages the creation and destruction of the array (via an
std::vector). This also reduces memory fragmentation since the 2D array
is actually implemented using a single N*M entry array instead of N
M-sized arrays.

The Grid abstracts away the details of accessing the grid entries so
that clients can just use (x,y) coordinate pairs as they would with 2D
C-style arrays.
Refactoring MessagePipe, map triggers and settings

MessagePipe, triggers and settings have been updated to use C++11 smart
pointers instead of managing their own memory.