MAINT: in periodogram/welch, improve empty array handling and test warnings.

Also add a few more tests for complete test coverage.