Remove unnecessary casts

Gson used to deserialize numerical values as Double so that ugly casts were necessary
in some places. After the migration to Jackson, these casts can be removed.

Refs #955