SERVER-5424 use NumberInt function template in mongoToV8Element

Signed-off-by: Matt Kangas <matt.kangas@mongodb.com>