Update apply method of tensors
Update apply method of tensors

Now this method is capable of better handling of all keyword arguments
of tensor constructors.  And the semantics is made exactly analogous to
the replace method for named tuples.  Maybe this function should be made
private or even removed due to its possible risk of wrong results.

tschijnmo/drudge,tschijnmo/drudge,tschijnmo/drudge