ENH/BUG: unify rank computaiton and add better support for SSS filtered data

@agramfort @Eric89GXL @mluessi FYI
Don't forget to add license and authors to the new files