Abstractions and automated algorithms for mixed-dimensional finite element methods