Implement generic support for interpolating variables in project templates

@umop

This CL is part of preparations for generalized combined template/Bower/Pub support.