Astar didn't found the shortest path, due to rounding errors.

The implementation of A* uses int variables for cost, but it at the same time supports diagonal lines, which mean that it doesn't allways find the shortest path.
If you for instance try with the following map, it doesn't find the shortest path.
      sxxxooooxo
      xoxxxxooxo
      oxxoxoooxo
      oooooxxxoo
      oooxxooxxx
      xxXooxxooo
      oxxXxxoxoo
      oxxoxooxoo
      oxxoxooxox
      oxoooxxxog

The patch changes the types to doubles, removes the floor calls, and fixes a problem in the function hueristic. The hueristic function should be "optimistic", understod as the hueristiccost should never be higher than the actual cost of getting to the goal.