Fixed memory leak, added a couple of features

Hi Justin,

I've fixed a memory leak pertaining to the use of placement new with FSA. Turns out the object destructor needs to be explicitly called when using such a method of creating objects in a specific memory space. Turning off FSA reverts to the normal new allocation, which doesn't leak any memory.

Also, I've added a function to the the total cost g of a solution path at the end of a search. I feel it could be useful to expose the information (and it is only a simple extension).

A template interface has been added as well, to facilitate quick reference to the functions AStarSearch requires. I found myself referring back to your sample files often when implementing the functions, and thought it would be good to consolidate that information in the header file.

Thanks for creating this easy-to-use class, and I hope you find my changes useful!