Revert broken fix and test (#12446)

The timeoutInterval variable needs to be part of per-UI state for the
code to work correctly. Storing it in a servlet-global MetadataWriter
instance is both semantically wrong and a race condition.

Also, the test currently throws NPE if assertions are enabled.

This reverts commit f595d057951523baf35a797692376dfa5de0bc8d.

Change-Id: Ia6d1383b2c112b86ce60c75a3ebb9f10da545d4a