Worldline approach to noncommutative field theory