Move more utility functions to utils.jl (again so they can be include()'d)

Change representation of PDScalF to include the dimension.