Fix the ptr-to-int conversion warning better
Fix the ptr-to-int conversion warning better

Currently it gives a warning in MinGW, and uses a warning suppression
on MSVC.

This fix tries to do it "as needed".

C compilers use to warn on converting pointers to integral types even
when casted to the target type, because old programs used to assign
pointers to integers and then back, a thing that is non-portable. So
casting to (unsigned long) doesn't help in this regard.

The solution is to first cast to an integral type that can hold a
pointer (intptr_t) and then explicitly cast to the final integral type
(int).

opencog/link-grammar,ampli/link-grammar,ampli/link-grammar,opencog/link-grammar,ampli/link-grammar,linas/link-grammar,opencog/link-grammar,ampli/link-grammar,opencog/link-grammar,linas/link-grammar,linas/link-grammar,ampli/link-grammar,linas/link-grammar,linas/link-grammar,ampli/link-grammar,linas/link-grammar,ampli/link-grammar,linas/link-grammar,linas/link-grammar,ampli/link-grammar,ampli/link-grammar,opencog/link-grammar,linas/link-grammar,opencog/link-grammar,opencog/link-grammar,opencog/link-grammar,opencog/link-grammar