(#22363) Add file/line when creating resources and parameters

The previous version of the logic cheated with "todo" and -1. Now
the file and line is picked up from the reference expression.
While not 100% accurate (it gives the resource expression as a whole,
or the parameter expr as a whole as the location instead of the more
detailed expression (one particular title etc).
(#22363) Add file/line information to resource operations

The resource related statments were using fake file and line infomation.
This is now picked up from the source position / locator and passed on
to 3x logic.